contrib/sign.sh: fix handling of filenames with spaces

This commit is contained in:
Benny Baumann 2015-03-26 20:59:27 +01:00 committed by Matthias Schiffer
parent 9449f0f5d8
commit a3559a4d32

View File

@ -18,23 +18,23 @@ See also
EOHELP
exit 1
fi
SECRET=$1
manifest=$2
upper=$(mktemp)
lower=$(mktemp)
SECRET="$1"
manifest="$2"
upper="$(mktemp)"
lower="$(mktemp)"
awk "BEGIN { sep=0 }
/^---\$/ { sep=1; next }
{ if(sep==0) print > \"$upper\";
else print > \"$lower\"}" \
$manifest
ecdsasign $upper < $SECRET >> $lower
cat $upper > $manifest
echo --- >> $manifest
cat $lower >> $manifest
rm -f $upper $lower
"$manifest"
ecdsasign "$upper" < "$SECRET" >> "$lower"
cat "$upper" > "$manifest"
echo --- >> "$manifest"
cat "$lower" >> "$manifest"
rm -f "$upper" "$lower"