mirror of
https://github.com/danog/Telegram.git
synced 2024-12-02 09:27:55 +01:00
28 lines
626 B
Bash
28 lines
626 B
Bash
#!/bin/sh
|
|
|
|
if [ $# -ne 2 ]; then
|
|
echo usage: $0 app-plist-file watch-plist-file
|
|
exit 1
|
|
fi
|
|
|
|
plist="$1"
|
|
watchplist="$2"
|
|
dir="$(dirname "$plist")"
|
|
|
|
version=$(/usr/libexec/Plistbuddy -c "Print CFBundleShortVersionString" "$plist")
|
|
|
|
if [ -z "$version" ]; then
|
|
echo "No version number in $plist"
|
|
exit 2
|
|
fi
|
|
|
|
buildnum=$(/usr/libexec/Plistbuddy -c "Print CFBundleVersion" "$plist")
|
|
|
|
if [ -z "$buildnum" ]; then
|
|
echo "No build number in $plist"
|
|
exit 2
|
|
fi
|
|
|
|
/usr/libexec/Plistbuddy -c "Set CFBundleShortVersionString $version" "$watchplist"
|
|
/usr/libexec/Plistbuddy -c "Set CFBundleVersion $buildnum" "$watchplist"
|