Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at python-updates 48 lines 1.3 kB view raw
1diff --git a/bin/nexus b/bin/nexus 2index d06cb44..37c606e 100755 3--- a/bin/nexus 4+++ b/bin/nexus 5@@ -88,7 +88,7 @@ create_db_entry() { 6 fi 7 db_new_file=${db_file}_new 8 if [ -f "$db_file" ]; then 9- awk '$2 != "'"$test_dir"'" {print $0}' $db_file > $db_new_file 10+ awk '$2 != "'"$test_dir"'" {print $scriptname}' $db_file > $db_new_file 11 rm "$db_file" 12 mv "$db_new_file" "$db_file" 13 fi 14@@ -246,7 +246,7 @@ read_vmoptions() { 15 16 unpack_file() { 17 if [ -f "$1" ]; then 18- jar_file=`echo "$1" | awk '{ print substr($0,1,length-5) }'` 19+ jar_file=`echo "$1" | awk '{ print substr($scriptname,1,length-5) }'` 20 bin/unpack200 -r "$1" "$jar_file" 21 22 if [ $? -ne 0 ]; then 23@@ -377,9 +377,14 @@ fi 24 25 old_pwd=`pwd` 26 27-progname=`basename "$0"` 28-linkdir=`dirname "$0"` 29+scriptname=$0 30 31+if [ ! -z "$ALTERNATIVE_NAME" ]; then 32+ scriptname=`dirname "$0"`"/"$ALTERNATIVE_NAME 33+fi 34+ 35+progname=`basename "$scriptname"` 36+linkdir=`dirname "$scriptname"` 37 cd "$linkdir" 38 prg="$progname" 39 40@@ -590,7 +595,7 @@ return_code=$? 41 42 ;; 43 *) 44- echo "Usage: $0 {start|stop|run|run-redirect|status|restart|force-reload}" 45+ echo "Usage: $scriptname {start|stop|run|run-redirect|status|restart|force-reload}" 46 exit 1 47 ;; 48 esac