From e6f7350106a33782bcac47dd45d2acca09d01f5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Berg?= Date: Wed, 24 Mar 2010 09:24:31 +0100 Subject: [PATCH] Remove the superfluous string comparison shell function. --- scripts/install.sh | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index e128629..f1b2b2c 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -20,19 +20,7 @@ # Installs GitX.app to $CUSTOM_INSTALL_DIR from Install.xcconfig -# returns 1 if $1 contains $2 -# and 0 if it does not -function strcont() { - result="${1//*$2*/#}" - result="${result//#/$2}" - if [[ "$result" == "$2" ]]; then - echo 1 - else - echo 0 - fi -} - -if [[ $(strcont $BUILD_STYLE "Install") == 1 ]]; then +if [[ $BUILD_STYLE =~ "Install" ]]; then echo "Installing to ${CUSTOM_INSTALL_DIR}... (switch to build config other than Install to avoid)" if [[ -e /opt/local/bin/rsync ]]; then /opt/local/bin/rsync -rlHEptog --xattrs --acls "$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME" "$CUSTOM_INSTALL_DIR/"