1
0
mirror of https://github.com/danog/Telegram.git synced 2024-11-26 20:14:43 +01:00
Telegram/tools/bump_build_number.sh

18 lines
366 B
Bash
Raw Normal View History

2015-10-01 18:19:52 +02:00
#!/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"