File tree 1 file changed +51
-0
lines changed
1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # /////////////////////////////////////////////////////////////////
4
+ #
5
+ # woff2-compress-build.sh
6
+ # A shell script that builds the woff2_compress build dependency
7
+ # Copyright 2018 Christopher Simpkins
8
+ # MIT License
9
+ #
10
+ # Usage: ./woff2-compress-build.sh
11
+ #
12
+ # /////////////////////////////////////////////////////////////////
13
+
14
+ # The woff2 git clone directory.
15
+ BUILD=" $HOME "
16
+ INST=" $HOME /woff2"
17
+
18
+ # woff2 executable path
19
+ WOFF2_BIN=" $BUILD /woff2/woff2_compress"
20
+
21
+ if test -d " $INST " -o -f " $INST " ; then
22
+ echo " Build directory \` $INST ' must not exist."
23
+ exit 1
24
+ fi
25
+
26
+ cd " $BUILD " || exit 1
27
+
28
+ echo " #####"
29
+ echo " git clone woff2 project"
30
+ echo " #####"
31
+
32
+ # clone the Source Foundry fork of the woff2 repo
33
+ # contains fix for OS X build bug - https://github.com/google/woff2/issues/73
34
+ # recursive flag to clone the brotli submodule within the woff2 repo
35
+ git clone --recursive https://github.com/source-foundry/woff2.git
36
+
37
+ cd " $INST " || exit 1
38
+
39
+ echo " #####"
40
+ echo " Build woff2"
41
+ echo " #####"
42
+
43
+ make clean all
44
+
45
+ if [ -f " $WOFF2_BIN " ]; then
46
+ echo " "
47
+ echo " woff2_compress successfully built on the path '$WOFF2_BIN '"
48
+ else
49
+ echo " The woff2_compress build failed."
50
+ exit 1
51
+ fi
You can’t perform that action at this time.
0 commit comments