-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmix-install-fontawesome
executable file
·66 lines (55 loc) · 1.34 KB
/
mix-install-fontawesome
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
#!/bin/sh
### Package: mix-install-fontawesome
### Version: v20210912.2300
### Author: Michael Gan "xmixahlx" [email protected]
### License: GPLv3
### Script Dependencies: (none)
## OVERRIDES
# MIXTOOLSDIR
if [ -z $MIXTOOLSDIR ]; then
MIXTOOLSDIR="`pwd`"
PATH=$MIXTOOLSDIR:$PATH
fi
echo "*** MIXTOOLSDIR selected is $MIXTOOLSDIR."
# INSTALLDEPS
if [ -z $INSTALLDEPS ]; then
INSTALLDEPS=debian
fi
echo "*** INSTALLDEPS selected is $INSTALLDEPS."
# GITBRANCH
if [ -z $GITBRANCH ]; then
GITBRANCH=master
fi
echo "*** GITBRANCH selected is $GITBRANCH."
## VARS
DEVDIR=$MIXTOOLSDIR/upstream
GITURL=https://github.com
GITREPO=fortawesome
GITTREE=font-awesome
PKGDIR=$GITTREE\_$GITBRANCH
## DEPS
# Provide INSTALLDEPS=debian to install dependencies.
if [ $INSTALLDEPS ]; then
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y install coreutils git
fi
fi
## PREP
set -e
mkdir -p $DEVDIR
cd $DEVDIR
## GIT
[ -d $PKGDIR ] || git clone --recursive --depth=1 $GITURL/$GITREPO/$GITTREE.git --branch=$GITBRANCH $PKGDIR
cd $PKGDIR
git clean -dfx
git reset --hard
git pull
git submodule update --init --recursive --depth=1
## INSTALL
sudo mkdir -p /usr/local/share/fonts/TTF
sudo mkdir -p /usr/local/share/fonts/OTF
sudo install -Dm644 webfonts/*.ttf /usr/local/share/fonts/TTF/
sudo install -Dm644 otfs/*.otf /usr/local/share/fonts/OTF/
## EXIT
exit
## ENJOY