Skip to content

Instantly share code, notes, and snippets.

@jdonaldson
Last active December 15, 2015 11:49
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jdonaldson/5255703 to your computer and use it in GitHub Desktop.
Save jdonaldson/5255703 to your computer and use it in GitHub Desktop.
Simple bash script for switching between haxe nightly and stable
export OLDPATH=$PATH
export HAXE_NIGHTLY=$HOME/bin/haxe_nightly
hxn(){
if [ -z "$USE_HAXE_NIGHTLY" ] || $USE_HAXE_NIGHTLY; then
echo "Changing to Haxe stable version"
export HAXE_STD_PATH=$OLD_HAXE_STD
export PATH=$OLDPATH
export USE_HAXE_NIGHTLY=false
else
echo "Changing to Haxe nightly at: $HAXE_NIGHTLY"
export OLD_HAXE_STD=$HAXE_STD_PATH
export HAXE_STD_PATH=$HAXE_NIGHTLY/haxe/std:.
export OLDPATH=$PATH
export PATH=$HAXE_NIGHTLY/haxe:$PATH
export USE_HAXE_NIGHTLY=true
fi
}
@jcward
Copy link

jcward commented Jun 10, 2013

FYI, this doesn't take into account the ~/.haxelib file, which I got after using nme-installer.sh (owned by root no-less. Tsk tsk tsk.)

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