Make install.sh work if run outside its path
This commit is contained in:
parent
106555bc95
commit
cb7b429927
16
install.sh
16
install.sh
|
@ -11,7 +11,17 @@
|
|||
a2serverVersion="1.9.0"
|
||||
a2sScriptURL="https://raw.githubusercontent.com/RasppleII/a2server/master"
|
||||
|
||||
# Run the legacy setup script for anything not yet ported
|
||||
if [ -e setup/index.txt ]; then
|
||||
source setup/index.txt "$@"
|
||||
a2sDevel="$( dirname "${BASH_SOURCE[0]}" )"
|
||||
if [[ -f "$a2sDevel/.a2server_source" ]]; then
|
||||
pushd $a2sDevel >/dev/null
|
||||
a2sDevel="$PWD"
|
||||
popd >/dev/null
|
||||
else
|
||||
printf "a2server: Cannot find a2server source tree relative to ${BASH_SOURCE[0]}\n\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Run the legacy setup script for anything not yet ported
|
||||
if [[ -e "${a2sDevel}/setup/index.txt" ]]; then
|
||||
source "${a2sDevel}/setup/index.txt" "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue