-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRelease
executable file
·55 lines (32 loc) · 1.01 KB
/
Release
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
ZIP=$1
COLOR_STOP="\033[0m"
COLOR_INFO="\033[1;33m"
DIR="$PWD"
echo_info() {
echo -e "$COLOR_INFO--- $1 ---$COLOR_STOP"
}
echo_info "Building"
boon build src/
rm -r release/
mv src/release/ release/
echo_info "Setting Up Directories"
cd release
# $_ is the last argument given to the previous command
mkdir 2d_map_editor_linux; mv 2d_map_editor.love $_
mkdir 2d_map_editor_macos; mv 2d_map_editor.app $_
unzip -q 2d_map_editor-win32.zip -d 2d_map_editor_win32
unzip -q 2d_map_editor-win64.zip -d 2d_map_editor_win64
rm -r 2d_map_editor-win*
echo_info "Removing Files"
find . -name "2d_map_editor_win*" | xargs -n 1 -i rm {}/{changes.txt,license.txt,readme.txt}
echo_info "Adding Files"
ls | xargs -n 1 -i mkdir {}/{map,tileset}
ls | xargs -n 1 cp -r ../LICENSE ../README.md ../editor.txt ../img
ls | xargs -n 1 -i cp ../tileset/release_tileset.png {}/tileset/tileset.png
if [ "$1" = "-z" ]; then
echo_info "Zipping Files"
ls | xargs -n 1 -i zip -qrm {}.zip {}
fi
echo_info "Done"
cd "$DIR"