Skip to content

Instantly share code, notes, and snippets.

@Marneus68
Created March 9, 2016 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Marneus68/bae019771ab08682d71c to your computer and use it in GitHub Desktop.
Save Marneus68/bae019771ab08682d71c to your computer and use it in GitHub Desktop.
#!/usr/bin/env rc
dir=$home/Desktop
cd /tmp
printf 'Cloning Textual... '
git clone -q 'https://github.com/Codeux-Software/Textual.git'
echo Done!
printf 'Cloning submodules... '
cd Textual
git submodule -q update --init --recursive
echo Done!
printf 'Patching... '
@ { cd 'Resources/Build Configurations'
echo 'CODE_SIGN_IDENTITY =' >'Code Signing Identity.xcconfig'
sed -i '' 's/MANAGER=1/MANAGER=0/' 'Shared Standard Release Configuration.xcconfig'
sed -i '' 's/SPARKLE_ENABLED=1/SPARKLE_ENABLED=0/' 'Shared Standard Release Configuration.xcconfig'
}
echo Done!
printf 'Building Textual... '
if (xcodebuild -target 'Textual (Standard Release)' -configuration 'Release'>log) {
echo Done!
osascript -e 'display notification "Build succeeded" with title "update_textual.rc" sound name "Glass"'
if (mv 'Build Results/Release/Textual.app' $dir) {
cd
rm -rf /tmp/Textual
echo Enjoy your free copy of Textual, you poor bastard!
}
} else {
echo Fuck!
cat log
osascript -e 'display notification "Something went wrong" with title "update_texual.rc" sound name "Sosumi"'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment