mirror of
https://codeberg.org/ziglings/exercises.git
synced 2024-12-27 01:46:29 +00:00
eowyn: always quote variables
Quote all the variables, even though we know that it is safe. Fix coding style.
This commit is contained in:
parent
752efd891d
commit
4b58de26d3
1 changed files with 6 additions and 7 deletions
|
@ -14,7 +14,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# We check ourselves before we wreck ourselves.
|
# We check ourselves before we wreck ourselves.
|
||||||
if [ ! -f 'patches/eowyn.sh' ]
|
if [ ! -f patches/eowyn.sh ]
|
||||||
then
|
then
|
||||||
echo "But I must be run from the project root directory."
|
echo "But I must be run from the project root directory."
|
||||||
exit 1
|
exit 1
|
||||||
|
@ -27,18 +27,17 @@ mkdir -p patches/healed
|
||||||
for broken in exercises/*.zig
|
for broken in exercises/*.zig
|
||||||
do
|
do
|
||||||
# Remove the dir and extension, rendering the True Name.
|
# Remove the dir and extension, rendering the True Name.
|
||||||
true_name=$(basename $broken .zig)
|
true_name=$(basename "$broken" .zig)
|
||||||
patch_name="patches/patches/$true_name.patch"
|
patch_name="patches/patches/$true_name.patch"
|
||||||
|
|
||||||
|
if [ -f "$patch_name" ]
|
||||||
if [ -f $patch_name ]
|
|
||||||
then
|
then
|
||||||
# Apply the bandages to the wounds, grow new limbs, let
|
# Apply the bandages to the wounds, grow new limbs, let
|
||||||
# new life spring into the broken bodies of the fallen.
|
# new life spring into the broken bodies of the fallen.
|
||||||
echo Healing $true_name...
|
echo Healing "$true_name"...
|
||||||
patch --output=patches/healed/$true_name.zig $broken $patch_name
|
patch --output="patches/healed/$true_name.zig" "$broken" "$patch_name"
|
||||||
else
|
else
|
||||||
echo Cannot heal $true_name. No patch found.
|
echo Cannot heal "$true_name". No patch found.
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue