aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Gauer <ratfactor@gmail.com>2021-03-02 20:07:03 -0500
committerGitHub <noreply@github.com>2021-03-02 20:07:03 -0500
commit2f1bf6f1af812bb5b53ac075d9e208dcb0f9abbb (patch)
tree91667b8481a9ba6b90c71dfa941bc99e189d4ae3
parent95bdff5bfdf3c4300b844e14251cd3dcfcd76ef8 (diff)
parent54f9cfc0f0298a42473a109ee0f4eaf89710f153 (diff)
downloadziglings-2f1bf6f1af812bb5b53ac075d9e208dcb0f9abbb.tar.gz
ziglings-2f1bf6f1af812bb5b53ac075d9e208dcb0f9abbb.tar.bz2
ziglings-2f1bf6f1af812bb5b53ac075d9e208dcb0f9abbb.tar.xz
ziglings-2f1bf6f1af812bb5b53ac075d9e208dcb0f9abbb.zip
Merge pull request #29 from g-w1/scr
patches: make interpreter compat and make work if not in PATH
-rwxr-xr-xpatches/eowyn.sh4
-rwxr-xr-xpatches/gollum.sh6
2 files changed, 5 insertions, 5 deletions
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