-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmake.bash
executable file
·40 lines (31 loc) · 894 Bytes
/
make.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash -e
rm -rf _build
check_tmp () {
xmllint ./dat/vesselData.xml > /dev/null
../../artemis-check.py --no-warn
}
# assumes the file location is good
# it really should check that, but that will be a long bit of code :/
# sorry if you edit it and it decides to zip your home directory
# assumes PWD is inside where the zip will be made
# $1 = zip name
create_zip () {
zipName="$1"
cd ..
zip -qr "$zipName".zip "$zipName"
}
# checks and creates the zip being created at $1
check_and_create () {
dir="$1"
old_dir="$PWD"
cd "$dir"
check_tmp
create_zip "`basename "$1"`"
version=`cat "$old_dir/src/version"`
convert "$old_dir/src/logo512.png" -gravity North -pointsize 45 -fill white -annotate +200+100 "$version" "EF MOD/dat/logo512.png"
cd "$old_dir"
}
build_loc="_build/EF MOD"
mkdir -p "$build_loc"
rsync -aWSH mod-files/ "$build_loc"
check_and_create "$build_loc"