From aaf15233b77948676516dd523280842686004473 Mon Sep 17 00:00:00 2001 From: matteo stagliano Date: Wed, 27 Oct 2021 13:57:24 +0200 Subject: [PATCH 1/3] test --- test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test.txt diff --git a/test.txt b/test.txt new file mode 100644 index 0000000..9daeafb --- /dev/null +++ b/test.txt @@ -0,0 +1 @@ +test From e64699ba606c29cd9485930d1953580b13a2c825 Mon Sep 17 00:00:00 2001 From: matteo stagliano Date: Wed, 27 Oct 2021 14:00:02 +0200 Subject: [PATCH 2/3] rm test --- test.txt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 test.txt diff --git a/test.txt b/test.txt deleted file mode 100644 index 9daeafb..0000000 --- a/test.txt +++ /dev/null @@ -1 +0,0 @@ -test From 336a58a1a50637e75c062321d3f9c6790de6e6aa Mon Sep 17 00:00:00 2001 From: totem4 Date: Wed, 27 Oct 2021 23:48:37 +0200 Subject: [PATCH 3/3] added path of global conf file --- sshrc.conf | 2 +- sshrc.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sshrc.conf b/sshrc.conf index 8e88fbe..4c1930e 100644 --- a/sshrc.conf +++ b/sshrc.conf @@ -1 +1 @@ -DSTPREFIX=mstagliano +DSTPREFIX=pippo diff --git a/sshrc.sh b/sshrc.sh index 8449f31..a22ef69 100755 --- a/sshrc.sh +++ b/sshrc.sh @@ -3,7 +3,8 @@ set -eu CURDIR=$(dirname $(readlink "$0")) -CONFHOME="~/.local/share/jssh/conf.d" +CONFLOCAL="~/.local/share/jssh" +CONFHOME="$CONFLOCAL/conf.d" CONFALLBACK="$CURDIR/conf.d" [[ -d $CONFHOME ]] && CONFDIR=$CONFHOME || CONFDIR=$CONFALLBACK @@ -12,7 +13,11 @@ CONFALLBACK="$CURDIR/conf.d" 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) [[ $(echo $arc | wc -c) -le 65535 ]] || { echo "Files size too large!"; exit 1; }