forked from gitter-badger/ios-app
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswiftybeaver.sh
More file actions
executable file
·26 lines (23 loc) · 846 Bytes
/
swiftybeaver.sh
File metadata and controls
executable file
·26 lines (23 loc) · 846 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
BASE_PATH="${SRCROOT}/swiftybeaver"
PLIST_NAME="SwiftyBeaver.plist"
PLIST="${BASE_PATH}/${PLIST_NAME}"
SCRIPT="${BASE_PATH}/vars.sh"
if [ ! -d $BASE_PATH ]; then
mkdir -p $BASE_PATH
fi
if [ -f $SCRIPT ]; then
if [ -f $PLIST ]; then
rm $PLIST
fi
echo "Sourced SwiftyBeaver…"
source $SCRIPT
if [ -n $SB_APP_ID -a -n $SB_APP_SECRET -a -n $SB_ENCRYPTION_KEY ]; then
echo "SwiftyBeaver Token setup correctly. Creating Plist…"
/usr/libexec/PlistBuddy -c "Add :SBAppId string ${SB_APP_ID}" $PLIST
/usr/libexec/PlistBuddy -c "Add :SBAppSecret string ${SB_APP_SECRET}" $PLIST
/usr/libexec/PlistBuddy -c "Add :SBEncryptionKey string ${SB_ENCRYPTION_KEY}" $PLIST
echo "Copying SwiftyBeaver.plist into application bundle…"
cp $PLIST "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/${PLIST_NAME}"
fi
fi