Added conffile path and fallback

dev
totem4 3 years ago
parent 92b2a451d7
commit 0ce4168dab

@ -2,7 +2,10 @@
set -eu set -eu
CONFDIR=/home/totem4/Apps/my_script/sshrc/conf.d CONFHOME="~/.local/share/jssh/conf.d"
CONFALLBACK="$(dirname $(readlink "$0"))/conf.d"
[[ -d $CONFHOME ]] && CONFDIR=$CONFHOME || CONFDIR=$CONFALLBACK
[[ -r $CONFDIR/bashrc ]] || { echo "Confdir or bashrc missing or lack of permissions!"; exit 1; } [[ -r $CONFDIR/bashrc ]] || { echo "Confdir or bashrc missing or lack of permissions!"; exit 1; }
DSTDIR=/tmp/conf.d DSTDIR=/tmp/conf.d
TARGET=$1 TARGET=$1

Loading…
Cancel
Save