commit 6b974d87718cda682da553023f86e8a038c2f420 Author: GRMrGecko Date: Thu Apr 21 11:18:03 2011 -0500 Xcode Scripts Start diff --git a/Build Directory.sh b/Build Directory.sh new file mode 100755 index 0000000..e1c3d26 --- /dev/null +++ b/Build Directory.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# Build Directory +# +# Created by Mr. Gecko on 4/21/11. +# No Copyright Claimed. Public Domain. +# + +if [ "$SRCROOT/build" != "$SYMROOT" ]; then + if [ -d "$SRCROOT/build" ]; then + /bin/rm -Rf "$SRCROOT/build" + fi + /bin/ln -fs "$SYMROOT" "$SRCROOT/build" +fi \ No newline at end of file diff --git a/Git Version.sh b/Git Version.sh new file mode 100755 index 0000000..c05f227 --- /dev/null +++ b/Git Version.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Git Version +# +# Created by Mr. Gecko on 4/21/11. +# No Copyright Claimed. Public Domain. +# + +INFO="${CONFIGURATION_BUILD_DIR}/${CONTENTS_FOLDER_PATH}/Info" +GITDIR="${PROJECT_DIR}/.git" + +VERSION=`defaults read "${INFO}" CFBundleVersion` +if [ -d "${GITDIR}" ]; then + REVISION=`git --git-dir="${GITDIR}" rev-parse --short HEAD` + defaults write "${INFO}" CFBundleShortVersionString -string "${VERSION} (${REVISION})" +else + defaults write "${INFO}" CFBundleShortVersionString -string "${VERSION}" +fi \ No newline at end of file