diff options
author | Erich Eckner <git@eckner.net> | 2020-10-14 10:50:32 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-10-14 10:50:32 +0200 |
commit | 0c42315ed3345da620be62ab13a320b6f838cb42 (patch) | |
tree | 8bffe29b61d1b4927359b0c2488a8e115dbd25f2 | |
parent | 231dd2709f60a416344d878314a39cecad8ec812 (diff) | |
download | devops-0c42315ed3345da620be62ab13a320b6f838cb42.tar.xz |
update-archlinux32-package: remove trailing / in sed
-rwxr-xr-x | update-archlinux32-package | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/update-archlinux32-package b/update-archlinux32-package index 28190e5..6795598 100755 --- a/update-archlinux32-package +++ b/update-archlinux32-package @@ -205,7 +205,12 @@ case ${update_path} in repo_arch=$( git -C "${used_upstream_git_path}/${pkgname}/repos" archive HEAD -- 2>/dev/null | \ tar -t 2>/dev/null | \ - sed 's/^'"${repo}-"'//;t;d' | \ + sed -n ' + s/^'"${repo}-"'// + T + s@/$@@ + p + ' | \ head -n1 ) if [ -z "${repo_arch}" ]; then @@ -213,7 +218,12 @@ case ${update_path} in repo_arch=$( git -C "${used_upstream_git_path}/${pkgname}/repos" archive HEAD -- | \ tar -t | \ - sed 's/^'"${repo}-"'//;t;d' | \ + sed -n ' + s/^'"${repo}-"'// + T + s@/$@@ + p + ' | \ head -n1 ) fi |