[commit: ghc] wip/nfs-locking: Adds quotes. (a1f3c8d)

git at git.haskell.org git at git.haskell.org
Thu Oct 26 23:54:56 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/a1f3c8df8f27422eef777f4b9ff4e6a844c88532/ghc

>---------------------------------------------------------------

commit a1f3c8df8f27422eef777f4b9ff4e6a844c88532
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Tue Jan 5 20:54:18 2016 +0800

    Adds quotes.


>---------------------------------------------------------------

a1f3c8df8f27422eef777f4b9ff4e6a844c88532
 build.sh | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/build.sh b/build.sh
index de9b9d7..a3f0bf5 100755
--- a/build.sh
+++ b/build.sh
@@ -1,33 +1,33 @@
 #!/usr/bin/env bash
 
+set -euo pipefail
+
 # readlink on os x, doesn't support -f, to prevent the
 # need of installing coreutils (e.g. through brew, just
 # for readlink, we use the follownig substitute.
 #
 # source: http://stackoverflow.com/a/1116890
 function rl {
-    TARGET_FILE=$1
+    TARGET_FILE="$1"
 
     cd "$(dirname "$TARGET_FILE")"
-    TARGET_FILE=$(basename "$TARGET_FILE")
+    TARGET_FILE="$(basename "$TARGET_FILE")"
 
     # Iterate down a (possible) chain of symlinks
     while [ -L "$TARGET_FILE" ]
     do
-        TARGET_FILE=$(readlink "$TARGET_FILE")
+        TARGET_FILE="$(readlink "$TARGET_FILE")"
         cd "$(dirname "$TARGET_FILE")"
-        TARGET_FILE=$(basename "$TARGET_FILE")
+        TARGET_FILE="$(basename "$TARGET_FILE")"
     done
 
     # Compute the canonicalized name by finding the physical path
     # for the directory we're in and appending the target file.
-    PHYS_DIR=`pwd -P`
-    RESULT=$PHYS_DIR/$TARGET_FILE
-    echo $RESULT
+    PHYS_DIR="$(pwd -P)"
+    RESULT="$PHYS_DIR/$TARGET_FILE"
+    echo "$RESULT"
 }
 
-set -euo pipefail
-
 root="$(dirname "$(rl "$0")")"
 
 mkdir -p "$root/.shake"



More information about the ghc-commits mailing list