OSDN Git Service

masterブランチに変更
[wesnoth-ja/transifex_scripts.git] / build.sh
1 #!/bin/bash
2 # Wesnothのソースコードを最新のものに更新、ビルドを行うスクリプト
3
4 set -eu
5
6 WESNOTH_DIR="wesnoth"
7 BUILD_DIR="build"
8
9 if [ ! -d ${WESNOTH_DIR} ]; then
10   echo 'wesnothリポジトリのクローン'
11   git clone https://github.com/wesnoth/wesnoth.git
12 fi
13
14 cd ${WESNOTH_DIR}
15 echo '作業ツリーの変更をリセット'
16 git stash
17 git stash clear
18 echo 'リポジトリの更新・マージ'
19 git fetch origin
20 git checkout master
21 git merge origin/master
22
23 if [ ! -d ${BUILD_DIR} ]; then
24   mkdir ${BUILD_DIR}
25 fi
26 cd ${BUILD_DIR}
27 echo 'ビルドの設定'
28 cmake .. -DENABLE_POT_UPDATE_TARGET=TRUE # potの更新を有効化する
29 echo 'ビルドの開始'
30 make -j3