tdesktop/Telegram/PrepareLinux.sh

40 lines
1.3 KiB
Bash
Raw Normal View History

2014-11-18 13:59:18 +00:00
AppVersionStr=0.6.11
AppVersion=6011
2014-07-14 05:16:21 +00:00
if [ -d "./../Linux/Release/deploy/$AppVersionStr" ]; then
2014-07-14 05:16:21 +00:00
echo "Deploy folder for version $AppVersionStr already exists!"
exit 1
fi
if [ -f "./../Linux/Release/tlinuxupd$AppVersion" ]; then
2014-07-14 05:16:21 +00:00
echo "Update file for version $AppVersion already exists!"
exit 1
fi
if [ ! -f "./../Linux/Release/Telegram" ]; then
2014-07-14 05:16:21 +00:00
echo "Telegram not found!"
exit 1
fi
if [ ! -f "./../Linux/Release/Updater" ]; then
2014-07-14 05:16:21 +00:00
echo "Updater not found!"
exit 1
fi
echo "Preparing version $AppVersionStr, executing Packer.."
cd ./../Linux/Release && ./Packer -path Telegram -path Updater -version $AppVersion && cd ./../../Telegram
2014-07-14 05:16:21 +00:00
echo "Packer done!"
if [ ! -d "./../Linux/Release/deploy" ]; then
mkdir "./../Linux/Release/deploy"
2014-07-14 05:16:21 +00:00
fi
echo "Copying Telegram, Updater and tlinuxupd$AppVersion to deploy/$AppVersionStr..";
mkdir "./../Linux/Release/deploy/$AppVersionStr"
mkdir "./../Linux/Release/deploy/$AppVersionStr/Telegram"
mv ./../Linux/Release/Telegram ./../Linux/Release/deploy/$AppVersionStr/Telegram/
mv ./../Linux/Release/Updater ./../Linux/Release/deploy/$AppVersionStr/Telegram/
mv ./../Linux/Release/tlinuxupd$AppVersion ./../Linux/Release/deploy/$AppVersionStr/
cd ./../Linux/Release/deploy/$AppVersionStr && tar -cJvf tsetup.$AppVersionStr.tar.xz Telegram/ && cd ./../../../../Telegram
2014-07-14 05:16:21 +00:00
echo "Version $AppVersionStr prepared!";