Replace pwd with script dir
This commit is contained in:
@@ -18,14 +18,14 @@
|
|||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
declare -g SCRIPTVERSION="1.0-dev"
|
declare -g SCRIPTVERSION="1.0-dev"
|
||||||
declare -g OUTPUTDIR="$PWD/output"
|
declare -g SCRIPTDIR=; SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
declare -g OUTPUTDIR="$SCRIPTDIR/output"
|
||||||
declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,76.0.html" # MC30
|
declare -g BOARDURL="https://yabb.jriver.com/interact/index.php/board,76.0.html" # MC30
|
||||||
declare -g DEBIANBASE="buster"
|
declare -g DEBIANBASE="buster"
|
||||||
declare -g MCVERSION_HARDCODE="${MCVERSION:-"30.0.72"}" # Hardcoded fallback
|
declare -g MCVERSION_HARDCODE="${MCVERSION:-"30.0.72"}" # Hardcoded fallback
|
||||||
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
declare -g CREATEREPO_WEBROOT="/var/www/jriver"
|
||||||
declare -g USER="${SUDO_USER:-$USER}"
|
declare -g USER="${SUDO_USER:-$USER}"
|
||||||
declare -g HOME; HOME=$(getent passwd "$USER" | cut -d: -f6)
|
declare -g HOME; HOME=$(getent passwd "$USER" | cut -d: -f6)
|
||||||
declare -g SCRIPTDIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
||||||
|
|
||||||
printHelp() {
|
printHelp() {
|
||||||
debug "Running: ${FUNCNAME[0]}"
|
debug "Running: ${FUNCNAME[0]}"
|
||||||
@@ -1033,7 +1033,7 @@ restoreLicense() {
|
|||||||
# Glob mjr files from common directories
|
# Glob mjr files from common directories
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
declare -a mjrfiles=(
|
declare -a mjrfiles=(
|
||||||
"$PWD"/*.mjr
|
"$SCRIPTDIR"/*.mjr
|
||||||
"$OUTPUTDIR"/*.mjr
|
"$OUTPUTDIR"/*.mjr
|
||||||
"$HOME"/[dD]ownloads/*.mjr
|
"$HOME"/[dD]ownloads/*.mjr
|
||||||
"$HOME"/[dD]ocuments/*.mjr
|
"$HOME"/[dD]ocuments/*.mjr
|
||||||
@@ -1427,7 +1427,7 @@ service_jriver-createrepo() {
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
$USER_STRING
|
$USER_STRING
|
||||||
ExecStart=$PWD/installJRMC --outputdir $OUTPUTDIR --createrepo=$TARGET --createrepo-webroot $CREATEREPO_WEBROOT --createrepo-user $CREATEREPO_USER
|
ExecStart=$SCRIPTDIR/installJRMC --outputdir $OUTPUTDIR --createrepo=$TARGET --createrepo-webroot $CREATEREPO_WEBROOT --createrepo-user $CREATEREPO_USER
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
Reference in New Issue
Block a user