2020-04-30 17:06:03 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
PPSSPP="${1}"
|
|
|
|
PPSSPPiOS="${PPSSPP}/PPSSPP"
|
|
|
|
|
|
|
|
if [ ! -f "${PPSSPPiOS}" ]; then
|
2024-05-05 17:15:50 +00:00
|
|
|
echo "macbundle.sh: No such file: ${PPSSPPiOS}!"
|
2020-04-30 17:06:03 +00:00
|
|
|
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
|
2024-05-05 14:48:33 +00:00
|
|
|
|
|
|
|
echo "macbundle.sh: Updated ${PPSSPP}/Info.plist"
|