Xcode Scripts Start

This commit is contained in:
GRMrGecko 2011-04-21 11:18:03 -05:00
commit 6b974d8771
2 changed files with 32 additions and 0 deletions

14
Build Directory.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
#
# Build Directory
#
# Created by Mr. Gecko <GRMrGecko@gmail.com> 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

18
Git Version.sh Executable file
View File

@ -0,0 +1,18 @@
#!/bin/bash
#
# Git Version
#
# Created by Mr. Gecko <GRMrGecko@gmail.com> 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