aboutsummaryrefslogtreecommitdiffstats
path: root/gpg-sign-all
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2011-10-19 21:15:53 -0700
committerH. Peter Anvin <hpa@zytor.com>2011-10-19 21:15:53 -0700
commit60415f4ab276b69183df0827fdae97d970403a33 (patch)
treea566011fb28494cd8186a90fe685391cd6c50db5 /gpg-sign-all
parent4c5ba3bb155b232f37069bcb0f19291c4a1ba626 (diff)
downloadkup-60415f4ab276b69183df0827fdae97d970403a33.tar.gz
kup-60415f4ab276b69183df0827fdae97d970403a33.tar.xz
kup-60415f4ab276b69183df0827fdae97d970403a33.zip
gpg-sign-all: handle files with names starting with -
For completeness, handle files with names starting in - correctly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'gpg-sign-all')
-rwxr-xr-xgpg-sign-all8
1 files changed, 4 insertions, 4 deletions
diff --git a/gpg-sign-all b/gpg-sign-all
index 62dda54..bff22c7 100755
--- a/gpg-sign-all
+++ b/gpg-sign-all
@@ -9,20 +9,20 @@ for f; do
fbare=$(echo "$f" | sed -e 's/\.[^./]*$//')
case "$f" in
*.gz)
- gzip -cd "$f" | gpg --use-agent -a -b -o "$fbare".sign \
+ 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 \
+ 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 \
+ xz -cd -- "$f" | gpg --use-agent -a -b -o "$fbare".sign \
--set-filename "$(basename "$fbare")" -
;;
*)
gpg --use-agent -a -b -o "$f".sign \
- --set-filename "$(basename "$f")" "$f"
+ --set-filename "$(basename "$f")" - < "$f"
;;
esac
done