summaryrefslogtreecommitdiff
path: root/bin/extra
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-11-06 09:29:30 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-11-06 09:29:30 +0100
commit61d5bb429488794ac178a47fa73c38322aa14c04 (patch)
tree6cd7d3510f999701b5e2f7fe10b0f790cd868243 /bin/extra
parentaf9608a3a98f0ab4217da80b8d478810505801bc (diff)
parent694813e05187b5ccf144425c4bad6f5ab4f92234 (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/extra')
-rwxr-xr-xbin/extra/aivpn6
-rwxr-xr-xbin/extra/supd14
2 files changed, 7 insertions, 13 deletions
diff --git a/bin/extra/aivpn b/bin/extra/aivpn
index fd72ffb..3c87ce8 100755
--- a/bin/extra/aivpn
+++ b/bin/extra/aivpn
@@ -33,9 +33,3 @@ ssh vm "rasdial \"vpn.student.ehb.be\""
ssh -f -N \
-L 2222:10.2.160.41:22 \
vm
-
-ssh -t \
- -L 8188:localhost:8188 \
- vm \
- ssh -N -L 8188:localhost:8188 luca@10.2.160.41
-logn "[8188], [2222]"
diff --git a/bin/extra/supd b/bin/extra/supd
index c7e4e8c..9a5ce0c 100755
--- a/bin/extra/supd
+++ b/bin/extra/supd
@@ -20,19 +20,19 @@ do
(
cd "$dir" || return
# is git dir
- git rev-parse > /dev/null 2>&1 || return
- printf '%s: ' "$dir" | >&2 sed "s#$HOME#~#"
- if git "${1:-fetch}" > /dev/null 2>&1
+ if ! git rev-parse > /dev/null 2>&1
then
- printf 'o'
- else
printf 'x\n'
- return
+ exit
fi
+ printf '%s: ' "$dir" | >&2 sed "s#$HOME#~#"
+ git "${1:-fetch}" > /dev/null 2>&1 &&
+ printf 'o' ||
+ printf 'x'
# Show remote state
printf ' %s%s\n' "$(git status --short 2> /dev/null |
awk 'NR==1 {print "(" $1 ")"}')" "$(git branch -v 2>/dev/null |
awk -F '[][]' '/^\*/ {print $2}' |
- sed 's/ahead/↑ /;s/behind/↓ /;s/[^↓↑]*/ /g')"
+ sed 's/ahead/↑ /;s/behind/↓ /;s/[^↓↑]*//g')"
)
done