-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathupdate-submodules.sh
executable file
·77 lines (69 loc) · 1.78 KB
/
update-submodules.sh
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh
show_help() {
echo "Usage: $0 [OPTIONS]"
echo ""
echo "Options:"
echo " --no-zlib Skip updating the zlib submodule"
echo " --no-libpng Skip updating the libpng submodule"
echo " --no-freetype Skip updating the FreeType submodule"
echo " --no-harfbuzz Skip updating the HarfBuzz submodule"
echo " --minimal Apply all the --no-* options"
echo " --help Show this help message"
}
# Default values for options
NO_ZLIB=false
NO_LIBPNG=false
NO_FREETYPE=false
NO_HARFBUZZ=false
# Parse command line arguments
for arg in "$@"; do
case $arg in
--no-zlib)
NO_ZLIB=true
;;
--no-libpng)
NO_LIBPNG=true
;;
--no-freetype)
NO_FREETYPE=true
;;
--no-harfbuzz)
NO_HARFBUZZ=true
;;
--minimal)
NO_ZLIB=true
NO_LIBPNG=true
NO_FREETYPE=true
NO_HARFBUZZ=true
;;
--help)
show_help
exit 0
;;
*)
echo "Unknown option: $arg"
show_help
exit 1
;;
esac
done
git submodule update --init --depth 1 aseprite
cd aseprite
git submodule update --init --depth 1 \
laf \
src/flic \
third_party/cityhash \
third_party/fmt \
third_party/pixman
if [ "$NO_HARFBUZZ" = false ]; then
git submodule update --init --depth 1 third_party/harfbuzz
fi
if [ "$NO_LIBPNG" = false ]; then
git submodule update --init --depth 1 third_party/libpng
fi
if [ "$NO_ZLIB" = false ]; then
git submodule update --init --depth 1 third_party/zlib
fi
if [ "$NO_FREETYPE" = false ]; then
git submodule update --init --depth 1 --recursive third_party/freetype2
fi