-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·44 lines (38 loc) · 987 Bytes
/
build.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
#!/usr/bin/env bash
WORKING_DIR=$(pwd)
function build_symlinks(){
cat $1 | while read symlink; do
to="${symlink#* }"
from="${symlink% *}"
if [ -e $to ]; then
continue
fi
cd $2
echo "[-] linking $2$from -> $2$to"
ln -sf "$from" "$to"
cd $WORKING_DIR
done
}
function build_cookies(){
src_symlinks=src/cookies/symlinks
dist_cursors=dist/cookies/cursors/
if [ -d "$dist_cursors" ]; then
echo "[-] building cookies theme symlinks"
build_symlinks $src_symlinks $dist_cursors
echo "[*] cookies theme symlinks done"
fi
}
function build_animaljam(){
src_symlinks=src/animaljam/symlinks
dist_cursors=dist/animaljam/cursors/
if [ -d "$dist_cursors" ]; then
echo "[-] building cookies theme symlinks"
build_symlinks $src_symlinks $dist_cursors
echo "[*] cookies theme symlinks done"
fi
}
function main(){
build_cookies
build_animaljam
}
main