aboutsummaryrefslogtreecommitdiffstats
path: root/gpg-sign-all
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-10-19 21:08:59 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-10-19 21:08:59 -0700
commitc5b273508b93319f0eaf56d0aba9c9592ab4ef28 (patch)
tree9a6da90c69e2ed1a8a48d6e5d0654948afe1c3d4 /gpg-sign-all
parent164e8b07c411f2edcef2d126a9e29c53f37a6c4e (diff)
downloadkup-c5b273508b93319f0eaf56d0aba9c9592ab4ef28.tar.gz
kup-c5b273508b93319f0eaf56d0aba9c9592ab4ef28.tar.xz
kup-c5b273508b93319f0eaf56d0aba9c9592ab4ef28.zip
gpg-sign-all: use basenames when setting filenames
If the filename even matters it should be the basename... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpg-sign-all')
-rwxr-xr-xgpg-sign-all11
1 files changed, 7 insertions, 4 deletions
diff --git a/gpg-sign-all b/gpg-sign-all
index bf7c57d..6dce03f 100755
--- a/gpg-sign-all
+++ b/gpg-sign-all
@@ -9,16 +9,19 @@ for f; do
fbare=$(echo "$f" | sed -e 's/\.[^./]*$//')
case "$f" in
*.gz)
- gzip -cd "$f" | gpg --use-agent -a -b -o "$fbare".sign --set-filename "$fbare" -
+ gzip -cd "$f" | gpg --use-agent -a -b -o "$fbare".sign \
+ --set-filename "$(basename "$fbare")" -
;;
*.bz2)
- bzip2 -cd "$f" | gpg --use-agent -a -b -o "$fbare".sign --set-filename "$fbare" -
+ bzip2 -cd "$f" | gpg --use-agent -a -b -o "$fbare".sign \
+ --set-filename "$(basename "$fbare")" -
;;
*.xz)
- xz -cd "$f" | gpg --use-agent -a -b -o "$fbare".sign --set-filename "$fbare" -
+ xz -cd "$f" | gpg --use-agent -a -b -o "$fbare".sign \
+ --set-filename "$(basename "$fbare")" -
;;
*)
- gpg --use-agent -a -b -o "$f".sign "$f"
+ gpg --use-agent -a -b -o "$f".sign "$(basename "$f")"
;;
esac
done