-
-
Save explodi/4341756 to your computer and use it in GitHub Desktop.
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 | |
# Perform Backup of all the files | |
if [[ ! -d ~/Minecraft_Backups/ ]];then | |
echo "Creating backup directory ~/Minecraft_Backups/" | |
mkdir -p ~/Minecraft_Backups/ | |
fi | |
tar -czf ~/Minecraft_Backups/`date +%Y%m%d`-backup.tgz /Applications/MinecraftSP.app | |
#Modify the Info.plist file for the new version of Java | |
if [[ -a /Applications/MinecraftSP.app/Contents/Info.plist ]];then | |
sed -i -e 's/1\.5\+/1.6+/' /Applications/MinecraftSP.app/Contents/Info.plist | |
sed -i -e '/I386/ c\ | |
X86_64<\/string>\ | |
I386<\/string>\ | |
' /Applications/MinecraftSP.app/Contents/Info.plist | |
else | |
echo "Info.plist not found in /Applications/MinecraftSP.app/Contents/" | |
fi | |
cp /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStub /Applications/MinecraftSP.app/Contents/MacOS/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment