Last active
December 19, 2015 14:39
-
-
Save erbmicha/5970790 to your computer and use it in GitHub Desktop.
patch for riak script to allow symlinking (Riak v1.4.0) - FOR HOMEBREW ONLY
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/bin/riak b/bin/riak | |
index 2936025..54f801b 100755 | |
--- a/bin/riak | |
+++ b/bin/riak | |
@@ -4,12 +4,19 @@ | |
# installed by node_package (github.com/basho/node_package) | |
-# Pull environment for this install | |
-. "$(cd ${0%/*} && pwd)/../lib/env.sh" | |
- | |
- | |
-# Keep track of where script was invoked | |
-ORIGINAL_DIR=$(pwd) | |
+if [ -L $0 ]; then | |
+ # Pull environment for this install | |
+ . "$(cd ${0%/*} && pwd)/$(dirname $(readlink $0))/../lib/env.sh" | |
+ | |
+ # Keep track of where script was invoked | |
+ ORIGINAL_DIR=$(cd ${0%/*} && pwd)/$(dirname $(readlink $0)) | |
+elif [ -f $0 ]; then | |
+ # Pull environment for this install | |
+ . "$(cd ${0%/*} && pwd)/../lib/env.sh" | |
+ | |
+ # Keep track of where script was invoked | |
+ ORIGINAL_DIR=$(pwd) | |
+fi | |
# Make sure CWD is set to runner run dir | |
cd $RUNNER_BASE_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment