aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes1
-rw-r--r--README.md1
-rw-r--r--build.zig4
-rw-r--r--exercises/48_methods2.zig3
-rw-r--r--patches/README.md1
-rwxr-xr-xpatches/eowyn.sh4
-rwxr-xr-xpatches/gollum.sh6
7 files changed, 10 insertions, 10 deletions
diff --git a/.gitattributes b/.gitattributes
index 2ab768e..97386d9 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -14,4 +14,3 @@
# Text files to always have LF (unix) line endings on checkout.
*.sh text eol=lf
*.zig text eol=lf
-
diff --git a/README.md b/README.md
index de0a808..b5262f5 100644
--- a/README.md
+++ b/README.md
@@ -163,4 +163,3 @@ Planned exercises:
The initial topics for these exercises were unabashedly cribbed from
[ziglearn.org](https://ziglearn.org/). I've since moved things around
in an order that I think best lets each topic build upon each other.
-
diff --git a/build.zig b/build.zig
index ee44d52..9c379ea 100644
--- a/build.zig
+++ b/build.zig
@@ -348,7 +348,7 @@ pub fn build(b: *Builder) void {
\\ _ _ _
\\ ___(_) __ _| (_)_ __ __ _ ___
\\ |_ | |/ _' | | | '_ \ / _' / __|
- \\ / /| | (_| | | | | | | (_| \__ \
+ \\ / /| | (_| | | | | | | (_| \__ \
\\ /___|_|\__, |_|_|_| |_|\__, |___/
\\ |___/ |___/
\\
@@ -525,7 +525,7 @@ const ZiglingStep = struct {
zig_args.append(@tagName(builder.color)) catch unreachable;
}
- const zig_file = std.fs.path.join(builder.allocator, &[_][]const u8{
+ const zig_file = std.fs.path.join(builder.allocator, &[_][]const u8{
if (self.use_healed) "patches/healed" else "exercises", self.exercise.main_file }) catch unreachable;
zig_args.append(builder.pathFromRoot(zig_file)) catch unreachable;
diff --git a/exercises/48_methods2.zig b/exercises/48_methods2.zig
index 37b182c..f97710d 100644
--- a/exercises/48_methods2.zig
+++ b/exercises/48_methods2.zig
@@ -66,3 +66,6 @@ fn visitElephants(first_elephant: *Elephant) void {
// name or alias in a comment below this one and make a
// pull request on GitHub for a piece of eternal Ziglings
// glory. The first five (5) PRs will be accepted!
+//
+// 1) drforester - I found one in the Zig source:
+// https://github.com/ziglang/zig/blob/041212a41cfaf029dc3eb9740467b721c76f406c/src/Compilation.zig#L2495
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