summarylogtreecommitdiffstats
path: root/cli.patch
diff options
context:
space:
mode:
Diffstat (limited to 'cli.patch')
-rw-r--r--cli.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/cli.patch b/cli.patch
index 4cc7a483ccdb..cf7d2364fe99 100644
--- a/cli.patch
+++ b/cli.patch
@@ -22,6 +22,30 @@ diff --unified --recursive --text CLI/bin/ares "CLI (copy)/bin/ares"
# run node script with imported params
-PATH="$BIN_DIR:$PATH" node "$SCRIPT" "$@"
+$BIN_DIR/$CLI_ARCH/node "$SCRIPT" "$@"
+diff --unified --recursive --text CLI/bin/ares-extend-dev "CLI (copy)/bin/ares-extend-dev"
+--- CLI/bin/ares-extend-dev 2020-02-05 13:56:34.000000000 +0000
++++ "CLI (copy)/bin/ares-extend-dev" 2020-05-20 17:53:41.426428160 +0100
+@@ -1,7 +1,13 @@
+ #!/bin/bash
+
+ # the folder this script is in
+-BIN_DIR=$(cd "`dirname "$0"`" && pwd)
++SOURCE="${BASH_SOURCE[0]}"
++while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
++ DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
++ SOURCE="$(readlink "$SOURCE")"
++ [[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
++done
++BIN_DIR="$( cd -P "$( dirname "$SOURCE" )" >/dev/null 2>&1 && pwd )"
+
+ # node script we are going to run
+ SCRIPT="${BIN_DIR}/ares-extend-dev.js"
+@@ -16,4 +19,4 @@
+ export NODE_PATH=$(cd "${BIN_DIR}/../lib" && pwd)
+
+ # run node script with imported params
+-PATH="$BIN_DIR:$PATH" node "$SCRIPT" "$@"
++$BIN_DIR/$ARCH/node "$SCRIPT" "$@"
diff --unified --recursive --text CLI/bin/ares-device-info "CLI (copy)/bin/ares-device-info"
--- CLI/bin/ares-device-info 2020-02-05 13:56:34.000000000 +0000
+++ "CLI (copy)/bin/ares-device-info" 2020-05-20 17:53:41.426428160 +0100