Просмотр исходного кода

patches: make interpreter compat and make work if not in PATH

jacob gw 4 лет назад
Родитель
Сommit
81e819ca6b
2 измененных файлов с 5 добавлено и 5 удалено
  1. 2 2
      patches/eowyn.sh
  2. 3 3
      patches/gollum.sh

+ 2 - 2
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.

+ 3 - 3
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