forked from hrydgard/ppsspp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmacbundle.sh
20 lines (17 loc) · 826 Bytes
/
macbundle.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash
PPSSPP="${1}"
PPSSPPiOS="${PPSSPP}/PPSSPP"
if [ ! -f "${PPSSPPiOS}" ]; then
echo "No such file: ${PPSSPPiOS}!"
exit 0
fi
GIT_VERSION_LINE=$(grep "PPSSPP_GIT_VERSION = " "$(dirname "${0}")/../git-version.cpp")
SHORT_VERSION_MATCH='.*"v([0-9\.]+(-[0-9]+)?).*";'
LONG_VERSION_MATCH='.*"v(.*)";'
if [[ "${GIT_VERSION_LINE}" =~ ^${SHORT_VERSION_MATCH}$ ]]; then
plutil -replace CFBundleShortVersionString -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${SHORT_VERSION_MATCH}/\$1/g") ${PPSSPP}/Info.plist
plutil -replace CFBundleVersion -string $(echo ${GIT_VERSION_LINE} | perl -pe "s/${LONG_VERSION_MATCH}/\$1/g") ${PPSSPP}/Info.plist
else
plutil -replace CFBundleShortVersionString -string "" ${PPSSPP}/Info.plist
plutil -replace CFBundleVersion -string "" ${PPSSPP}/Info.plist
fi