|
|
@ -3,7 +3,8 @@
|
|
|
|
set -eu
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
|
|
|
|
CURDIR=$(dirname $(readlink "$0"))
|
|
|
|
CURDIR=$(dirname $(readlink "$0"))
|
|
|
|
CONFHOME="~/.local/share/jssh/conf.d"
|
|
|
|
CONFLOCAL="~/.local/share/jssh"
|
|
|
|
|
|
|
|
CONFHOME="$CONFLOCAL/conf.d"
|
|
|
|
CONFALLBACK="$CURDIR/conf.d"
|
|
|
|
CONFALLBACK="$CURDIR/conf.d"
|
|
|
|
|
|
|
|
|
|
|
|
[[ -d $CONFHOME ]] && CONFDIR=$CONFHOME || CONFDIR=$CONFALLBACK
|
|
|
|
[[ -d $CONFHOME ]] && CONFDIR=$CONFHOME || CONFDIR=$CONFALLBACK
|
|
|
@ -12,7 +13,11 @@ CONFALLBACK="$CURDIR/conf.d"
|
|
|
|
|
|
|
|
|
|
|
|
DSTPREFIX=jssh
|
|
|
|
DSTPREFIX=jssh
|
|
|
|
|
|
|
|
|
|
|
|
[[ -f $CURDIR/sshrc.conf ]] && source $CURDIR/sshrc.conf
|
|
|
|
if [[ -r "$CONFLOCAL/sshrc.conf" ]]; then
|
|
|
|
|
|
|
|
source "$CONFLOCAL/sshrc.conf"
|
|
|
|
|
|
|
|
elif [[ -r "$CURDIR/sshrc.conf" ]]; then
|
|
|
|
|
|
|
|
source "$CURDIR/sshrc.conf"
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
arc=$(tar czf - -C $CONFDIR $(find $CONFDIR -type f -printf "%f ")| base64 -w0)
|
|
|
|
arc=$(tar czf - -C $CONFDIR $(find $CONFDIR -type f -printf "%f ")| base64 -w0)
|
|
|
|
[[ $(echo $arc | wc -c) -le 65535 ]] || { echo "Files size too large!"; exit 1; }
|
|
|
|
[[ $(echo $arc | wc -c) -le 65535 ]] || { echo "Files size too large!"; exit 1; }
|
|
|
|