summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xnix-script7
-rwxr-xr-xnix-script-update-package-def.sh6
2 files changed, 9 insertions, 4 deletions
diff --git a/nix-script b/nix-script
index 0a9ed80..5c22a90 100755
--- a/nix-script
+++ b/nix-script
@@ -2,14 +2,13 @@
usage() {
cat <<EOS >&2
- $(basename $0) [options] <command> <commandoptions>
+ $(help_synopsis "${BASE_SOURCE[0]}" "[options] <command> <commandoptions>")
-l | --list-commands List all available commands
-v Be verbose
-h Show this help and exit
- (c) 2015 Matthias Beyer
- GPLv2 licensed
+$(help_end)
EOS
}
@@ -87,7 +86,7 @@ then
exit 0
fi
-[ -z "$COMMAND" ] && stderr "No command given" && exit 0
+[ -z "$COMMAND" ] && stderr "No command given" && exit 1
stdout "Searching for script for '$COMMAND'"
SCRIPT=$(script_for $COMMAND)
diff --git a/nix-script-update-package-def.sh b/nix-script-update-package-def.sh
index 9a38861..d0d068d 100755
--- a/nix-script-update-package-def.sh
+++ b/nix-script-update-package-def.sh
@@ -118,6 +118,12 @@ curl $URL > $TMP
stdout "Parsing subject to branch name"
PKG=$(cat $TMP | grep Subject | cut -d: -f 2 | sed -r 's,(\ *)(.*)(\ *),\2,')
+#translate subject line if necessary
+if [[ $(cat $TMP | grep "update from") ]]
+then
+ sed -i -r 's;Subject\:\ (.*)\:\ update from (.*) to (.*);Subject: \1\:\ \2 \ -> \3;' $TMP
+fi
+
CURRENT_BRANCH=$(__git_current_branch "$NIXPKGS")
__git "$NIXPKGS" checkout -b update-$PKG
if [[ $? -ne 0 ]]