summaryrefslogtreecommitdiff
path: root/bin/extra
diff options
context:
space:
mode:
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