File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # /////////////////////////////////////////////////////////////////
4
+ #
5
+ # sfnt2woff-zopfli-build.sh
6
+ # A shell script that builds the sfnt2woff-zopfli build dependency
7
+ # Copyright 2018 Christopher Simpkins
8
+ # MIT License
9
+ #
10
+ # Usage: ./sfnt2woff-zopfli-build.sh
11
+ #
12
+ # /////////////////////////////////////////////////////////////////
13
+
14
+ # The sfnt2woff-zopfli build directory.
15
+ BUILD=" $HOME /sfnt2woff-zopfli-build"
16
+
17
+ # sfnt2woff-zopfli version
18
+ SFNTWOFF_VERSION=" 1.1.0"
19
+ SFNTWOFF=" sfnt2woff-zopfli-$SFNTWOFF_VERSION "
20
+
21
+ # Path to sfnt2woff-zopfli executable
22
+ SFNTWOFF_BIN=" $BUILD /$SFNTWOFF /sfnt2woff-zopfli"
23
+
24
+ if test -d " $BUILD " -o -f " $BUILD " ; then
25
+ echo " Build directory '$BUILD ' must not exist."
26
+ exit 1
27
+ fi
28
+
29
+ mkdir " $BUILD "
30
+
31
+ cd " $BUILD " || exit 1
32
+
33
+ echo " #####"
34
+ echo " Download archive."
35
+ echo " #####"
36
+
37
+ curl -L -O " https://github.com/bramstein/sfnt2woff-zopfli/archive/v$SFNTWOFF_VERSION .tar.gz"
38
+
39
+ echo " #####"
40
+ echo " Extract archives."
41
+ echo " #####"
42
+
43
+ tar -xzvf " v$SFNTWOFF_VERSION .tar.gz"
44
+
45
+ cd " $SFNTWOFF " || exit 1
46
+
47
+ echo " #####"
48
+ echo " Build $SFNTWOFF ."
49
+ echo " #####"
50
+
51
+ make
52
+
53
+ if [ -f " $SFNTWOFF_BIN " ]; then
54
+ echo " sfnt2woff-zopfli successfully built on the path '$SFNTWOFF_BIN '"
55
+ else
56
+ echo " The sfnt2woff-zopfli build failed."
57
+ exit 1
58
+ fi
You can’t perform that action at this time.
0 commit comments