summaryrefslogtreecommitdiff
path: root/manualPorts/passwort-tresor/lastVersion.sh
diff options
context:
space:
mode:
Diffstat (limited to 'manualPorts/passwort-tresor/lastVersion.sh')
-rwxr-xr-xmanualPorts/passwort-tresor/lastVersion.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/manualPorts/passwort-tresor/lastVersion.sh b/manualPorts/passwort-tresor/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/passwort-tresor/lastVersion.sh
+++ b/manualPorts/passwort-tresor/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
" | \