Skip to content

Instantly share code, notes, and snippets.

@steinuil
Created June 15, 2016 23:33
Show Gist options
  • Save steinuil/ee247d4a8347b42cb29b03b8423ad088 to your computer and use it in GitHub Desktop.
Save steinuil/ee247d4a8347b42cb29b03b8423ad088 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