Skip to content

Instantly share code, notes, and snippets.

@sparksp
Forked from ry/gist:397472
Created May 11, 2010 16:46
Show Gist options
  • Save sparksp/397529 to your computer and use it in GitHub Desktop.
Save sparksp/397529 to your computer and use it in GitHub Desktop.
diff --git a/configure b/configure
index 7267f64..2273bb8 100755
--- a/configure
+++ b/configure
@@ -7,14 +7,12 @@ if [ ! -z "`echo $CC | grep ccache`" ]; then
exit 1
fi
-CUR_DIR=$PWD
-
#possible relative path
WORKINGDIR=`dirname $0`
-cd $WORKINGDIR
+pushd $WORKINGDIR
#abs path
WORKINGDIR=`pwd`
-cd $CUR_DIR
+popd
"${WORKINGDIR}/tools/waf-light" --jobs=1 configure $*
@sparksp
Copy link
Author

sparksp commented May 11, 2010

Using pushd / popd also works, and does not require double quotes; however you'll get some extra output unless you add > /dev/null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment