Skip to content

Instantly share code, notes, and snippets.

@randombrein
randombrein / bump-version_xcode.sh
Last active December 31, 2015 10:39
Xcode bump-version script using 'xcodebuild -showBuildSettings'
#!/bin/bash
function get_env_val {
path=$(xcode-select -print-path)
var=$($path/usr/bin/xcodebuild -showBuildSettings | sed -n -e 's/'"$1"' = \(.*\)/\1/p')
echo $var
}
SRCROOT=$(get_env_val "SRCROOT")
@randombrein
randombrein / pre-push_call-another
Last active December 31, 2015 10:29
'pre-push' script that prompt the push to user andthen call another script which exist at %rel_path/%script_name(mostly lays at $SRCROOT)
#!/bin/bash
############################
# 'pre-push' script that prompt the push to user and
# then call another script which exist at %rel_path/%script_name
# (mostly lays at $SRCROOT)
#set your script
script_name="another.sh"
#relative path