biglybt: 3.5.0.0 -> 3.6.0.0
[NixPkgs.git] / pkgs / development / tools / repository-managers / nexus / nexus-bin.patch
blob14bcc973aae744b06a34ff86f3d3a0ed87308d21
1 diff --git a/bin/nexus b/bin/nexus
2 index 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"
14 @@ -246,7 +246,7 @@ read_vmoptions() {
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"
22 if [ $? -ne 0 ]; then
23 @@ -377,9 +377,14 @@ fi
25 old_pwd=`pwd`
27 -progname=`basename "$0"`
28 -linkdir=`dirname "$0"`
29 +scriptname=$0
31 +if [ ! -z "$ALTERNATIVE_NAME" ]; then
32 + scriptname=`dirname "$0"`"/"$ALTERNATIVE_NAME
33 +fi
35 +progname=`basename "$scriptname"`
36 +linkdir=`dirname "$scriptname"`
37 cd "$linkdir"
38 prg="$progname"
40 @@ -590,7 +595,7 @@ return_code=$?
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
48 esac