mirror of
https://github.com/danog/Telegram.git
synced 2024-11-26 20:14:43 +01:00
18 lines
366 B
Bash
18 lines
366 B
Bash
#!/bin/sh
|
|
|
|
if [ $# -ne 1 ]; then
|
|
echo usage: $0 plist-file
|
|
exit 1
|
|
fi
|
|
|
|
plist="$1"
|
|
dir="$(dirname "$plist")"
|
|
|
|
buildnum=$(/usr/libexec/Plistbuddy -c "Print CFBundleVersion" "$plist")
|
|
if [ -z "$buildnum" ]; then
|
|
echo "No build number in $plist"
|
|
exit 2
|
|
fi
|
|
|
|
buildnum=$(expr $buildnum + 1)
|
|
/usr/libexec/Plistbuddy -c "Set CFBundleVersion $buildnum" "$plist" |