forked from lksoft/MailMessageUUIDs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGetLatestIntoPlugin.sh
More file actions
49 lines (40 loc) · 1.36 KB
/
GetLatestIntoPlugin.sh
File metadata and controls
49 lines (40 loc) · 1.36 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/sh
# UpdateInfoPlist.sh
# SignatureProfiler
#
# Created by Scott Little on 9/11/12.
#
# Ignore if we are cleaning
if [[ -n $ACTION && $ACTION = "clean" ]]; then
echo "Ignoring during clean"
exit 0
fi
SRCROOT='.'
# Set the locations
export MY_UUID_REPO_NAME="MailMessageUUIDs"
export MY_UUID_REPO="$SRCROOT/../$MY_UUID_REPO_NAME"
# Go into the MailMessagesUUIDs folder and ensure that it is up-to-date
if [ ! -d "$MY_UUID_REPO" ]; then
echo "UUID Script ERROR - The $MY_UUID_REPO_NAME submodule doesn't exist!!"
exit 1
fi
cd "$MY_UUID_REPO"
git checkout -q master
BRANCH=`git status | grep "# On branch" | cut -c 13-`
if [ "$BRANCH" != "master" ]; then
echo "UUID Script ERROR - $MY_UUID_REPO_NAME needs to be on the master branch - I can't seem to change to it"
exit 2
fi
IS_CLEAN=`git status | grep "nothing" | cut -c 1-17`
if [[ -z $IS_CLEAN || "$IS_CLEAN" != "nothing to commit" ]]; then
echo "UUID Script ERROR - $MY_UUID_REPO_NAME needs have a clean status"
exit 3
fi
git pull origin master
# Run the script there that generates the UUID list file
echo "Generating UUID list file"
/usr/bin/osascript "ProcessMailMessageInfo.applescript"
# Run the other script that will update my Info.plist file
echo "Updating Info.plist file"
echo "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"
/usr/bin/osascript "UpdateInfoPlist.applescript" "$BUILT_PRODUCTS_DIR/$INFOPLIST_PATH"