diff options
author | Martin Stockhammer <martin_s@apache.org> | 2021-12-17 22:06:21 +0100 |
---|---|---|
committer | Martin Stockhammer <martin_s@apache.org> | 2021-12-17 22:06:21 +0100 |
commit | bd087030423e35d4bf252f48fe37839e4a976ee0 (patch) | |
tree | eb2bf53f1ca4fd06ca95b7165f35f46c5bfcf14d /archiva-jetty/src | |
parent | 782d9cd25913e1e30b8bd549f0381abe0613e9ac (diff) | |
download | archiva-bd087030423e35d4bf252f48fe37839e4a976ee0.tar.gz archiva-bd087030423e35d4bf252f48fe37839e4a976ee0.zip |
Adding patch for bash script
Diffstat (limited to 'archiva-jetty/src')
-rw-r--r-- | archiva-jetty/src/main/patches/archiva.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/archiva-jetty/src/main/patches/archiva.patch b/archiva-jetty/src/main/patches/archiva.patch new file mode 100644 index 000000000..61797f156 --- /dev/null +++ b/archiva-jetty/src/main/patches/archiva.patch @@ -0,0 +1,41 @@ +--- target/generated-resources/appassembler/jsw/archiva/bin/archiva 2021-12-17 21:30:22.738291117 +0100 ++++ target/generated-resources/appassembler/jsw/archiva/bin/archiva.new 2021-12-17 21:32:39.040022280 +0100 +@@ -40,20 +40,24 @@ + APP_NAME="archiva" + APP_LONG_NAME="Apache Archiva" + +-# discover BASEDIR +-BASEDIR=`dirname "$0"`/.. +-BASEDIR=`(cd "$BASEDIR"; pwd)` +-ls -l "$0" | grep -e '->' > /dev/null 2>&1 +-if [ $? = 0 ]; then +- #this is softlink +- _PWD=`pwd` +- _EXEDIR=`dirname "$0"` +- cd "$_EXEDIR" +- _BASENAME=`basename "$0"` +- _REALFILE=`ls -l "$_BASENAME" | sed 's/.*->\ //g'` +- BASEDIR=`dirname "$_REALFILE"`/.. +- BASEDIR=`(cd "$BASEDIR"; pwd)` +- cd "$_PWD" ++if [ -z "$ARCHIVA_BASE" ]; then ++ # discover BASEDIR ++ BASEDIR=`dirname "$0"`/.. ++ BASEDIR=`(cd "$BASEDIR"; pwd)` ++ ls -l "$0" | grep -e '->' > /dev/null 2>&1 ++ if [ $? = 0 ]; then ++ #this is softlink ++ _PWD=`pwd` ++ _EXEDIR=`dirname "$0"` ++ cd "$_EXEDIR" ++ _BASENAME=`basename "$0"` ++ _REALFILE=`ls -l "$_BASENAME" | sed 's/.*->\ //g'` ++ BASEDIR=`dirname "$_REALFILE"`/.. ++ BASEDIR=`(cd "$BASEDIR"; pwd)` ++ cd "$_PWD" ++ fi ++else ++ BASEDIR="$ARCHIVA_BASE" + fi + + |