summaryrefslogtreecommitdiff
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
parent767648f0465f419df6b4942e5ac15efdff87bb1d (diff)
downloadcrux-ports-c66c68f1f7ce0c363e159a3a0cdb5c351ec21db5.tar.xz
lastVersion.sh für git.eckner.net vereinheitlicht und optimiert
-rwxr-xr-xmanualPorts/bash-completion-extras/lastVersion.sh6
-rwxr-xr-xmanualPorts/bash-git-prompt/lastVersion.sh6
-rwxr-xr-xmanualPorts/check-kernel/lastVersion.sh6
-rwxr-xr-xmanualPorts/crypt-expiry-check/lastVersion.sh6
-rwxr-xr-xmanualPorts/cryptfs-daemon/lastVersion.sh6
-rwxr-xr-xmanualPorts/dd-resume/lastVersion.sh6
-rwxr-xr-xmanualPorts/hardlinkedBackups/lastVersion.sh6
-rwxr-xr-xmanualPorts/logwatch-extra/lastVersion.sh6
-rwxr-xr-xmanualPorts/makekernel/lastVersion.sh6
-rwxr-xr-xmanualPorts/mark-as-expendable-dir/lastVersion.sh6
-rwxr-xr-xmanualPorts/mounted/lastVersion.sh6
-rwxr-xr-xmanualPorts/passwort-tresor/lastVersion.sh6
-rwxr-xr-xmanualPorts/runjobsparallel/lastVersion.sh6
-rwxr-xr-xmanualPorts/sendmailadvanced/lastVersion.sh6
-rwxr-xr-xmanualPorts/shutdownasap/lastVersion.sh6
-rwxr-xr-xmanualPorts/update-all/lastVersion.sh6
-rwxr-xr-xmanualPorts/update-ddns/lastVersion.sh6
17 files changed, 68 insertions, 34 deletions
diff --git a/manualPorts/bash-completion-extras/lastVersion.sh b/manualPorts/bash-completion-extras/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/bash-completion-extras/lastVersion.sh
+++ b/manualPorts/bash-completion-extras/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
" | \
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
" | \
diff --git a/manualPorts/check-kernel/lastVersion.sh b/manualPorts/check-kernel/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/check-kernel/lastVersion.sh
+++ b/manualPorts/check-kernel/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
" | \
diff --git a/manualPorts/crypt-expiry-check/lastVersion.sh b/manualPorts/crypt-expiry-check/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/crypt-expiry-check/lastVersion.sh
+++ b/manualPorts/crypt-expiry-check/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
" | \
diff --git a/manualPorts/cryptfs-daemon/lastVersion.sh b/manualPorts/cryptfs-daemon/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/cryptfs-daemon/lastVersion.sh
+++ b/manualPorts/cryptfs-daemon/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
" | \
diff --git a/manualPorts/dd-resume/lastVersion.sh b/manualPorts/dd-resume/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/dd-resume/lastVersion.sh
+++ b/manualPorts/dd-resume/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
" | \
diff --git a/manualPorts/hardlinkedBackups/lastVersion.sh b/manualPorts/hardlinkedBackups/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/hardlinkedBackups/lastVersion.sh
+++ b/manualPorts/hardlinkedBackups/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
" | \
diff --git a/manualPorts/logwatch-extra/lastVersion.sh b/manualPorts/logwatch-extra/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/logwatch-extra/lastVersion.sh
+++ b/manualPorts/logwatch-extra/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
" | \
diff --git a/manualPorts/makekernel/lastVersion.sh b/manualPorts/makekernel/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/makekernel/lastVersion.sh
+++ b/manualPorts/makekernel/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
" | \
diff --git a/manualPorts/mark-as-expendable-dir/lastVersion.sh b/manualPorts/mark-as-expendable-dir/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/mark-as-expendable-dir/lastVersion.sh
+++ b/manualPorts/mark-as-expendable-dir/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
" | \
diff --git a/manualPorts/mounted/lastVersion.sh b/manualPorts/mounted/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/mounted/lastVersion.sh
+++ b/manualPorts/mounted/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
" | \
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
" | \
diff --git a/manualPorts/runjobsparallel/lastVersion.sh b/manualPorts/runjobsparallel/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/runjobsparallel/lastVersion.sh
+++ b/manualPorts/runjobsparallel/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
" | \
diff --git a/manualPorts/sendmailadvanced/lastVersion.sh b/manualPorts/sendmailadvanced/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/sendmailadvanced/lastVersion.sh
+++ b/manualPorts/sendmailadvanced/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
" | \
diff --git a/manualPorts/shutdownasap/lastVersion.sh b/manualPorts/shutdownasap/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/shutdownasap/lastVersion.sh
+++ b/manualPorts/shutdownasap/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
" | \
diff --git a/manualPorts/update-all/lastVersion.sh b/manualPorts/update-all/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/update-all/lastVersion.sh
+++ b/manualPorts/update-all/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
" | \
diff --git a/manualPorts/update-ddns/lastVersion.sh b/manualPorts/update-ddns/lastVersion.sh
index 1147c0d..9d13169 100755
--- a/manualPorts/update-ddns/lastVersion.sh
+++ b/manualPorts/update-ddns/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
" | \