summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2015-07-12 19:12:47 +0200
committerMatthias Beyer <mail@beyermatthias.de>2015-07-15 22:02:31 +0200
commit3b3900e1ead3e77bd5bd930e5b1b5b64eff3113d (patch)
treeced0951418e56c776cabfa61469e81ec620148b4
parentb18b573ff04250c76bd5027b2a197d08cf42fe6d (diff)
Change user irrelevant outputs to dbg output
-rwxr-xr-xnix-script7
-rwxr-xr-xnix-script-diff-generations.sh20
-rwxr-xr-xnix-script-switch.sh10
-rwxr-xr-xnix-script-update-package-def.sh10
4 files changed, 24 insertions, 23 deletions
diff --git a/nix-script b/nix-script
index 3bca4e9..2fec7da 100755
--- a/nix-script
+++ b/nix-script
@@ -108,7 +108,7 @@ done
if [ $LIST_COMMANDS -eq 1 ]
then
- stdout "Listing commands"
+ dbg "Listing commands"
for cmd in $(all_commands)
do
echo $(scriptname_to_command $cmd)
@@ -118,8 +118,9 @@ fi
[ -z "$COMMAND" ] && stderr "No command given" && exit 1
-stdout "Searching for script for '$COMMAND'"
+dbg "Searching for script for '$COMMAND'"
SCRIPT=$(script_for $COMMAND)
+dbg "Script is: $SCRIPT"
#
# Error checking whether the script is available and executable.
@@ -127,7 +128,7 @@ SCRIPT=$(script_for $COMMAND)
[ ! -f $SCRIPT ] && stderr "Not available: $COMMAND -> $SCRIPT" && exit 1
[[ ! -x $SCRIPT ]] && stderr "Not executeable: $SCRIPT" && exit 1
-stdout "Parsing args for '$COMMAND'"
+dbg "Parsing args for '$COMMAND'"
SCRIPT_ARGS=$(shift_n $SHIFT_ARGS $*)
#
diff --git a/nix-script-diff-generations.sh b/nix-script-diff-generations.sh
index 4dd11d2..9d2b825 100755
--- a/nix-script-diff-generations.sh
+++ b/nix-script-diff-generations.sh
@@ -50,9 +50,9 @@ do
GEN_A=$(echo $OPTARG | cut -d "." -f 1)
GEN_B=$(echo $OPTARG | cut -d "." -f 3)
- stdout "Parsing generations: $OPTARG"
- stdout "Parsing generations: GEN_A: $GEN_A"
- stdout "Parsing generations: GEN_B: $GEN_B"
+ dbg "Parsing generations: $OPTARG"
+ dbg "Parsing generations: GEN_A: $GEN_A"
+ dbg "Parsing generations: GEN_B: $GEN_B"
[[ -z "$GEN_A" || -z "$GEN_B" ]] && \
stderr "Parsing error for '$OPTARG'" && usage && exit 1
@@ -76,13 +76,13 @@ gen_path() {
DIR_A=$(gen_path $GEN_A)
DIR_B=$(gen_path $GEN_B)
-stdout "VERBOSE : $VERBOSE"
-stdout "SYSTEM : $__SYSTEM"
-stdout "USER : $__USER"
-stdout "Generation A : $GEN_A"
-stdout "from directory : $DIR_A"
-stdout "Generation B : $GEN_B"
-stdout "from directory : $DIR_B"
+dbg "VERBOSE : $VERBOSE"
+dbg "SYSTEM : $__SYSTEM"
+dbg "USER : $__USER"
+dbg "Generation A : $GEN_A"
+dbg "from directory : $DIR_A"
+dbg "Generation B : $GEN_B"
+dbg "from directory : $DIR_B"
#
# Error checking whether the generations exist.
diff --git a/nix-script-switch.sh b/nix-script-switch.sh
index 3c7491c..697d948 100755
--- a/nix-script-switch.sh
+++ b/nix-script-switch.sh
@@ -54,20 +54,20 @@ do
case $OPTION in
c)
COMMAND=$OPTARG
- stdout "COMMAND = $COMMAND"
+ dbg "COMMAND = $COMMAND"
;;
w)
WD=$OPTARG
- stdout "WD = $WD"
+ dbg "WD = $WD"
;;
t)
TAG_NAME=$OPTARG
- stdout "TAG_NAME = $TAG_NAME"
+ dbg "TAG_NAME = $TAG_NAME"
;;
n)
HOSTNAME=""
- stdout "HOSTNAME disabled"
+ dbg "HOSTNAME disabled"
;;
h)
@@ -78,7 +78,7 @@ do
done
ARGS=$(echo $* | sed -r 's/(.*)(\-\-(.*)|$)/\2/')
-stdout "ARGS = $ARGS"
+dbg "ARGS = $ARGS"
[[ -z "$WD" ]] && \
stderr "No configuration git directory." && \
diff --git a/nix-script-update-package-def.sh b/nix-script-update-package-def.sh
index bb9dd0f..7abb799 100755
--- a/nix-script-update-package-def.sh
+++ b/nix-script-update-package-def.sh
@@ -61,22 +61,22 @@ do
case $OPTION in
y)
YES=1
- stdout "Setting YES"
+ dbg "Setting YES"
;;
b)
TESTBUILD=1
- stdout "Test-building enabled"
+ dbg "Test-building enabled"
;;
u)
URL="$OPTARG"
- stdout "URL = $URL"
+ dbg "URL = $URL"
;;
g)
NIXPKGS="$OPTARG"
- stdout "NIXPKGS = $NIXPKGS"
+ dbg "NIXPKGS = $NIXPKGS"
;;
c)
@@ -117,7 +117,7 @@ fi
stdout "Making temp directory"
TMP=$(mktemp)
-stdout "TMP = $TMP"
+dbg "TMP = $TMP"
stdout "Fetching patch"
curl $URL > $TMP