Last active
August 29, 2023 12:30
-
-
Save nbrew/5585878 to your computer and use it in GitHub Desktop.
Remove and reinstall haxe and neko.
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
#!/bin/bash | |
mkdir -p ~/Downloads/src | |
cd ~/Downloads/src | |
function uninstall_haxe() { | |
sudo rm -rf /usr/bin/haxe /usr/bin/haxelib /usr/lib/haxe | |
} | |
function install_haxe() { | |
curl -O http://haxe.org/file/haxe-3.0.0-rc2-osx.tar.gz | |
tar -zxvf haxe-3.0.0-rc2-osx.tar.gz | |
cd ~/Downloads/src/haxe-3.0.0-rc2-osx | |
sudo cp haxe /usr/bin/haxe | |
sudo mkdir /usr/lib/haxe | |
sudo cp -r std /usr/lib/haxe | |
sudo mkdir /usr/lib/haxe/lib | |
sudo chmod 777 /usr/lib/haxe/lib | |
sudo cp std/tools/haxelib/haxelib.sh /usr/bin/haxelib | |
sudo chmod +x /usr/bin/haxelib | |
} | |
function uninstall_neko() { | |
sudo rm -rf /usr/lib/neko /usr/bin/neko /usr/bin/nekoc /usr/bin/nekotools /usr/bin/nekoml /usr/bin/nekoml.std | |
sudo rm -f /usr/lib/libneko.dylib | |
} | |
function install_neko() { | |
curl -O http://nekovm.org/_media/neko-2.0.0-osx.tar.gz | |
tar -zxvf neko-2.0.0-osx.tar.gz | |
cd ../neko-2.0.0-osx | |
# use libneko.so for Linux | |
sudo cp -f libneko.dylib /usr/lib | |
sudo cp neko nekoc nekotools nekoml nekoml.std /usr/bin | |
sudo mkdir /usr/lib/neko | |
sudo cp *.ndll /usr/lib/neko | |
} | |
function install_libs() { | |
# add any libraries you know you want installed | |
haxelib install hxcpp | |
haxelib install actuate | |
haxelib install nme | |
echo '#!/bin/sh | |
haxelib run nme "$@"' | sudo tee /usr/bin/nme | |
} | |
uninstall_haxe | |
uninstall_neko | |
install_haxe | |
install_neko | |
install_libs |
Wow. That was silly. Updated (by removing the parens when calling the individual functions).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
./haxe_osx_remove_install.sh: line 50: syntax error near unexpected token
;' ./haxe_osx_remove_install.sh: line 50:
uninstall_haxe();'