Mercurial > hg > Members > atton > seminar_slides
annotate build.sh @ 6:f6d65d2a806f
Split const definitions into config/definition.sh
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 30 Jan 2014 22:08:04 +0900 |
parents | ab0287707334 |
children | e0c4a349c94f |
rev | line source |
---|---|
1 | 1 #/bin/sh |
2 | |
6
f6d65d2a806f
Split const definitions into config/definition.sh
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
3 # source definitions |
f6d65d2a806f
Split const definitions into config/definition.sh
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
4 . `dirname $0`/config/definition.sh |
2
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
5 |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
6 # functions |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
7 |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
8 command_check() { |
6
f6d65d2a806f
Split const definitions into config/definition.sh
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
9 if !(which ${build_command} >& /dev/null;) then |
f6d65d2a806f
Split const definitions into config/definition.sh
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
10 echo ${build_command} not found |
2
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
11 exit |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
12 fi |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
13 } |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
14 |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
15 build() { |
6
f6d65d2a806f
Split const definitions into config/definition.sh
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
16 ${build_command} build $1 -o `dirname $1` ${build_template_option} |
4
ab0287707334
Support exec build scirpt in any working directory
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
17 } |
2
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
18 |
4
ab0287707334
Support exec build scirpt in any working directory
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
19 build_slides() { |
6
f6d65d2a806f
Split const definitions into config/definition.sh
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
4
diff
changeset
|
20 target_list=`find $(dirname $0) -name "${build_target_filename}"` |
4
ab0287707334
Support exec build scirpt in any working directory
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
21 for target in ${target_list}; do |
ab0287707334
Support exec build scirpt in any working directory
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
22 build $target |
ab0287707334
Support exec build scirpt in any working directory
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
23 done |
2
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
24 } |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
25 |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
26 |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
27 # main |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
28 |
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
29 command_check |
4
ab0287707334
Support exec build scirpt in any working directory
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
2
diff
changeset
|
30 build_slides |
2
635d8af3f795
Fix build script, check command
Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp>
parents:
1
diff
changeset
|
31 |