OSDN Git Service

全ての処理を実行するスクリプトの名前を変更
[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 pull origin master
20
21 if [ ! -d ${BUILD_DIR} ]; then
22   mkdir ${BUILD_DIR}
23 fi
24 cd ${BUILD_DIR}
25 echo 'ビルドの設定'
26 cmake .. -DENABLE_POT_UPDATE_TARGET=TRUE # potの更新を有効化する
27 echo 'ビルドの開始'
28 make -j3