aboutsummaryrefslogtreecommitdiff
path: root/patches
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-03-05 11:01:16 -0500
committerDave Gauer <dave@ratfactor.com>2021-03-05 11:01:16 -0500
commit0f04860ac07ac03edf758607d343afa672bf25d4 (patch)
tree3dac6859509a576afadf05201b80400a562ee9ac /patches
parentc22c5d474d4c5c4ce9b4c29b39523f238a03f41d (diff)
parente4b8779ee59a8f514983657d1609e99c336c8b75 (diff)
downloadziglings-0f04860ac07ac03edf758607d343afa672bf25d4.tar.gz
ziglings-0f04860ac07ac03edf758607d343afa672bf25d4.tar.bz2
ziglings-0f04860ac07ac03edf758607d343afa672bf25d4.tar.xz
ziglings-0f04860ac07ac03edf758607d343afa672bf25d4.zip
Merge branch 'main' of github.com:ratfactor/ziglings into main
Diffstat (limited to 'patches')
-rw-r--r--patches/README.md1
-rwxr-xr-xpatches/eowyn.sh4
-rwxr-xr-xpatches/gollum.sh6
3 files changed, 5 insertions, 6 deletions
diff --git a/patches/README.md b/patches/README.md
index b3249fa..c249949 100644
--- a/patches/README.md
+++ b/patches/README.md
@@ -32,4 +32,3 @@ $ zig build -Dhealed [step]
Another Bash shell script named `gollum.sh` may also be found. He snatches the
original answers and stows them in his secret answers stash. If you leave him
alone, he'll leave you alone.
-
diff --git a/patches/eowyn.sh b/patches/eowyn.sh
index 5a802f6..f9e7479 100755
--- a/patches/eowyn.sh
+++ b/patches/eowyn.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# "I will be a shieldmaiden no longer,
# nor vie with the great Riders, nor
@@ -14,7 +14,7 @@
#
# We run from the patches dir. Go there now if not already.
-cd $(dirname $(which $0))
+cd $(dirname $(realpath $0))
pwd # Show it upon the screen so all shall be made apparent.
# Create healed/ directory here if it doesn't already exist.
diff --git a/patches/gollum.sh b/patches/gollum.sh
index 423d376..6531044 100755
--- a/patches/gollum.sh
+++ b/patches/gollum.sh
@@ -1,12 +1,12 @@
-#!/bin/bash
+#!/bin/sh
#
# "It isn't fair, my precious, is it,
# to ask us what it's got in it's
# nassty little pocketsess?"
-# Gollum, The Hobbit, or There and Back Again
+# Gollum, The Hobbit, or There and Back Again
#
-cd $(dirname $(which $0))
+cd $(dirname $(realpath $0))
f=$(basename ../exercises/$1*.zig .zig 2> /dev/null)
b=../exercises/$f.zig
a=../answers/$f.zig