Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

Commit

Permalink
SCRIPTPATH is now read from dirname($arg0) or readlink -f $arg0 if it…
Browse files Browse the repository at this point in the history
… is a

symlink
  • Loading branch information
Sven Speckmaier committed Jun 2, 2016
1 parent 3fd73da commit d07f026
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 3 additions & 4 deletions rancherize
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ function require_root {
}


SELF="$0"
SELF=$0
if [ -L "$0" ] ; then
SELF=$(readlink -f $0)
fi
pushd `dirname $SELF` > /dev/null
SCRIPTPATH=`pwd`
popd > /dev/null
SCRIPTPATH=$(dirname $SELF)
echo $SCRIPTPATH

. $SCRIPTPATH/upgrade_lib.sh

Expand Down
8 changes: 5 additions & 3 deletions upgrade_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
#
########################################################################################################################

pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd`
popd > /dev/null
if [ "$SCRIPTPATH" = "" ] ; then
pushd `dirname $0` > /dev/null
SCRIPTPATH=`pwd`
popd > /dev/null
fi

#
# Läd die docker-compose.yml und rancher-compose.yml für den in den Parametern angegebenen Rancher-Stack in das aktuelle
Expand Down

0 comments on commit d07f026

Please sign in to comment.