This file contains hidden or 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 | |
| if [ $(sw_vers -productVersion | awk -F. '{print $2}') -lt "11" ]; then | |
| echo "This script only works on macOS 10.11 or newer." | |
| exit | |
| fi | |
| # get user | |
| theUser=$(/usr/bin/stat -f "%Su" /dev/console) |
This file contains hidden or 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 | |
| a=$(/usr/bin/defaults read "$PRODUCT_SETTINGS_PATH" CFBundleVersion) | |
| b=$(/bin/expr $a + 1) | |
| /usr/bin/defaults write "$PRODUCT_SETTINGS_PATH" CFBundleVersion $b | |
| c=$(/usr/bin/xcodebuild -project "$PROJECT_FILE_PATH" -target "$TARGETNAME" -showBuildSettings | /usr/bin/grep PRODUCT_SETTINGS_PATH) | |
| d=${c%/*} | |
| e=${d#* = *} | |
| cd $e |
This file contains hidden or 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 | |
| a=$(/usr/bin/defaults read "$PRODUCT_SETTINGS_PATH" CFBundleVersion) | |
| b=$(/bin/expr $a + 1) | |
| /usr/bin/defaults write "$PRODUCT_SETTINGS_PATH" CFBundleVersion $b |
This file contains hidden or 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
| display dialog "Start or Stop Crashplan Server?" buttons {"Cancel", "Start", "Stop"} default button 1 | |
| copy the result as list to {buttonpressed} | |
| if the buttonpressed is "Start" then | |
| try | |
| do shell script "launchctl load /Library/LaunchDaemons/com.crashplan.proserver.plist" with administrator privileges | |
| end try | |
| else if the buttonpressed is "Stop" then | |
| try | |
| do shell script "launchctl unload /Library/LaunchDaemons/com.crashplan.proserver.plist" with administrator privileges | |
| end try |
This file contains hidden or 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
| tell application "Safari" | |
| set urlList to {} | |
| repeat with _tab in tabs of front window | |
| set end of urlList to URL of _tab | |
| end repeat | |
| end tell | |
| set urlString to urlList as string | |
| set quoteURL to quoted form of urlString | |
| do shell script "python <<EOF | |
| var = " & quoteURL & " |
NewerOlder