diff options
| author | Chris Boesch <[email protected]> | 2023-04-25 18:32:48 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-04-25 18:32:48 +0000 |
| commit | c43ade967796ceceb1d9fd219c8c9ace25e5b481 (patch) | |
| tree | 29a3c5c1dfbc4acb3e27bb3ce7e504ad405834af /patches | |
| parent | 58e28761be8edb2847876f563bece79e023a5ab9 (diff) | |
| parent | 6effa7fe842dd7fc05b6497da825b9861231b2a1 (diff) | |
| download | ziglings-c43ade967796ceceb1d9fd219c8c9ace25e5b481.tar.xz ziglings-c43ade967796ceceb1d9fd219c8c9ace25e5b481.zip | |
Merge pull request #255 from perillo/improve-ci-more
Improve ci more
Diffstat (limited to 'patches')
| -rwxr-xr-x | patches/eowyn.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/eowyn.sh b/patches/eowyn.sh index a036acf..0c3b299 100755 --- a/patches/eowyn.sh +++ b/patches/eowyn.sh @@ -12,9 +12,10 @@ # using the patches in this directory and convey them # to convalesce in the healed directory. # +set -e # We check ourselves before we wreck ourselves. -if [ ! -f 'patches/eowyn.sh' ] +if [ ! -f patches/eowyn.sh ] then echo "But I must be run from the project root directory." exit 1 @@ -27,22 +28,21 @@ mkdir -p patches/healed for broken in exercises/*.zig do # 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" - - if [ -f $patch_name ] + if [ -f "$patch_name" ] then # Apply the bandages to the wounds, grow new limbs, let # new life spring into the broken bodies of the fallen. - echo Healing $true_name... - patch --output=patches/healed/$true_name.zig $broken $patch_name + echo Healing "$true_name"... + patch --output="patches/healed/$true_name.zig" "$broken" "$patch_name" else - echo Cannot heal $true_name. No patch found. + echo Cannot heal "$true_name". No patch found. fi done -# Check the healed exercises formatting. +echo "Looking for non-conforming code formatting..." zig fmt --check patches/healed # Test the healed exercises. May the compiler have mercy upon us. |
