From f59382dbdaa640b88b2881560d6548ace42e2f58 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Wed, 10 Jun 2015 16:10:40 -0700 Subject: [PATCH] Use dirname in win/apm.sh Refs #6738 Refs #7141 --- resources/win/apm.sh | 3 ++- resources/win/atom.sh | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/resources/win/apm.sh b/resources/win/apm.sh index c895f2bce..b50a70a82 100644 --- a/resources/win/apm.sh +++ b/resources/win/apm.sh @@ -1,3 +1,4 @@ #!/bin/sh -"$0/../../app/apm/bin/node.exe" "$0/../../app/apm/lib/cli.js" "$@" +directory=$(dirname "$0") +"$directory/../app/apm/bin/node.exe" "$directory/../app/apm/lib/cli.js" "$@" diff --git a/resources/win/atom.sh b/resources/win/atom.sh index 8f312a2da..b6edeeb57 100644 --- a/resources/win/atom.sh +++ b/resources/win/atom.sh @@ -15,8 +15,10 @@ while getopts ":fhtvw-:" opt; do esac done +directory=$(dirname "$0") + if [ $EXPECT_OUTPUT ]; then - "$(dirname $0)/../../atom.exe" "$@" + "$directory/../../atom.exe" "$@" else - "$(dirname $0)/../app/apm/bin/node.exe" "$0/../atom.js" "$@" + "$directory/../app/apm/bin/node.exe" "$directory/atom.js" "$@" fi