Skip to content

Commit 34ccd0e

Browse files
committed
generate-release-checksums: Hopefully fix paths with spaces
I hate shell.
1 parent 01c0431 commit 34ccd0e

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

generate-release-checksums.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,14 @@ if [ -z "$1" ]; then
66
exit 1
77
fi
88

9-
for f in $(find "$1" -iname '*.img.xz'); do
10-
echo "Processing ${f}"
9+
find "$1" -iname '*.img.xz' -exec bash -c '
10+
echo "Processing" {}
1111
s_dir="${PWD}"
12-
f_dir="$(dirname "${f}")"
13-
f_name="$(basename "${f}")"
12+
f_dir="$(dirname "{}")"
13+
f_name="$(basename "{}")"
1414
echo "Entering ${f_dir}" && cd "${f_dir}"
1515
echo "Writing ${f_name}.sha256"
1616
sha256sum -b --tag "${f_name}" > "${f_name}.sha256"
17-
echo "Returning to ${s_dir}" && cd "${s_dir}"
18-
done
17+
echo "Returning to ${s_dir}" && cd "${s_dir}"' \;
1918

2019
exit 0

0 commit comments

Comments
 (0)