summaryrefslogtreecommitdiff
path: root/manualPorts/bash-git-prompt
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-03-29 09:04:50 +0200
committerErich Eckner <git@eckner.net>2021-03-29 09:04:50 +0200
commitc66c68f1f7ce0c363e159a3a0cdb5c351ec21db5 (patch)
treeada4cf85045a3f7077e162f221b6b31c421a681d /manualPorts/bash-git-prompt
parent767648f0465f419df6b4942e5ac15efdff87bb1d (diff)
downloadcrux-ports-c66c68f1f7ce0c363e159a3a0cdb5c351ec21db5.tar.xz
lastVersion.sh für git.eckner.net vereinheitlicht und optimiert
Diffstat (limited to 'manualPorts/bash-git-prompt')
-rwxr-xr-xmanualPorts/bash-git-prompt/lastVersion.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/manualPorts/bash-git-prompt/lastVersion.sh b/manualPorts/bash-git-prompt/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/bash-git-prompt/lastVersion.sh
+++ b/manualPorts/bash-git-prompt/lastVersion.sh
@@ -1,9 +1,11 @@
#!/bin/bash
-curl -Ss "https://git.eckner.net/Erich/$(basename "${0%/*}")/refs/" | \
+name=$(basename "$(readlink -f "${0%/*}")")
+
+curl -Ss "https://git.eckner.net/Erich/${name}/refs/" | \
tr '<>' '\n' | \
sed -n "
- s,^a href='/Erich/$(basename "${0%/*}")/snapshot/$(basename "${0%/*}")-\([0-9.]\+\)\.tar\.xz'$,\1,
+ s,^a href='/Erich/${name}/snapshot/${name}-\([0-9.]\+\)\.tar\.xz'$,\1,
T
p
" | \