summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-05-28 21:16:55 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-09-07 15:36:40 +0200
commita82ae9096fefc8bed71c002b8e99a930e2bc7fb4 (patch)
treef2445325808c39053eb4db4e61e7f23c942d0112
parentf68ad54e89fb5f210982f87f958a6b10195f07da (diff)
Add tool to list channel generations
-rwxr-xr-xnix-script-channel-list-generations.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/nix-script-channel-list-generations.sh b/nix-script-channel-list-generations.sh
new file mode 100755
index 0000000..6ab5408
--- /dev/null
+++ b/nix-script-channel-list-generations.sh
@@ -0,0 +1,32 @@
+#!/usr/bin/env bash
+
+source $(dirname ${BASH_SOURCE[0]})/nix-utils.sh
+
+Color_Off='\e[0m'
+Red='\e[0;31m'
+
+usage() {
+ cat <<EOS >&2
+ $(help_synopsis "${BASH_SOURCE[0]}" "[-h]")
+
+ -h | Show this help and exit
+
+$(help_end)
+EOS
+}
+
+while getopts "h" OPTION
+do
+ case $OPTION in
+ h)
+ usage
+ exit 0
+ ;;
+ *)
+ ;;
+ esac
+done
+
+stdout "Done with argument parsing"
+
+explain sudo nix-env -p /nix/var/nix/profiles/per-user/root/channels --list-generations