Last active
August 29, 2015 14:02
-
-
Save minorua/83992a38c47ee9d502e4 to your computer and use it in GitHub Desktop.
[qgis-jp][GUI翻訳] translationブランチの更新スクリプト
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# qgis-jpのtranslatioinブランチにmasterの更新を取り入れ、qgis_ja.tsを更新するスクリプト | |
# begin : 2013-05-09 | |
# remote repositories | |
# upstream: https://github.com/qgis/QGIS.git | |
# qgis-jp: [email protected]:qgis-jp/QGIS.git | |
updatediff=~/updates.diff | |
cd ~/dev/cpp/QGIS | |
git reset HEAD --hard | |
# update local branches | |
git checkout master | |
git pull upstream master | |
git checkout translation | |
git pull qgis-jp translation | |
git merge master | |
# ckeck merge conflict | |
if [ $? -ne 0 ]; then | |
echo "error occured while merging" | |
echo "continue to auto-fix? [y/n]..." | |
read ans | |
if [ $ans != "y" ]; then | |
exit 1 | |
fi | |
echo "auto-fixixing conflict: take qgis_ja.ts in translation" | |
git checkout ORIG_HEAD i18n/qgis_ja.ts | |
git commit | |
fi | |
# execute cmake to update *texts.cpp files | |
cd build-master | |
cmake .. | |
cd .. | |
# update .ts files | |
./scripts/update_ts_files.sh | |
# get revision of latest commit | |
rev=`git log --oneline -n 1 | cut -d " " -f 1` | |
# do commit | |
git add i18n/qgis_ja.ts | |
git commit -m "update qgis_ja.ts (using update_ts_files.sh, ${rev})" | |
git show HEAD > ${updatediff} | |
echo "diff outputted: ${updatediff}" | |
# do push | |
git log --oneline -n 5 | |
echo "ready... checked diff? let's push" | |
echo "git push qgis-jp master translation" | |
#git push qgis-jp master translation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment