123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- #!/bin/sh
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- SRC_DIR="www"
- DST_DIR="$BUILT_PRODUCTS_DIR/$FULL_PRODUCT_NAME"
- DST_DIR_WWW="$DST_DIR/www"
- COPY_HIDDEN=
- ORIG_IFS=$IFS
- IFS=$(echo -en "\n\b")
-
- if [[ -z "$BUILT_PRODUCTS_DIR" ]]; then
- echo "The script is meant to be run as an Xcode build step and relies on env variables set by Xcode."
- exit 1
- fi
-
- if [[ ! -e "$SRC_DIR" ]]; then
- echo "error: Path does not exist: $SRC_DIR"
- exit 2
- fi
-
- rm -rf "$DST_DIR_WWW"
-
-
- CODE=
- if [[ -n $COPY_HIDDEN ]]; then
- rsync -Lra "$SRC_DIR" "$DST_DIR"
- CODE=$?
- else
- rsync -Lra --exclude="- .*" "$SRC_DIR" "$DST_DIR"
- CODE=$?
- fi
-
- if [ $CODE -ne 0 ]; then
- echo "error: Error occurred on copying www. Code $CODE"
- exit 3
- fi
-
-
- cp -f "${PROJECT_FILE_PATH%.xcodeproj}/config.xml" "$DST_DIR"
-
- IFS=$ORIG_IFS
|