Last active
December 15, 2015 11:49
-
-
Save jdonaldson/5255703 to your computer and use it in GitHub Desktop.
Simple bash script for switching between haxe nightly and stable
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
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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI, this doesn't take into account the
~/.haxelib
file, which I got after usingnme-installer.sh
(owned by root no-less. Tsk tsk tsk.)