-
Notifications
You must be signed in to change notification settings - Fork 1
/
compile
executable file
·41 lines (38 loc) · 1.43 KB
/
compile
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
#!/usr/bin/env bash
BLUE=$(printf '\033[36m')
BOLD=$(printf '\033[1m')
NORMAL=$(printf '\033[m')
if [ "$1" == "bootstrap" ]; then
sass css/bootstrap/bootstrap.scss css/bootstrap.css --style compressed
elif [ "$1" == "style" ]; then
sass css/style.scss style.css --style compressed
elif [ "$1" == "magnific-popup" ]; then
sass css/magnific-popup/main.scss css/magnific-popup.min.css --style compressed
elif [ "$1" == "owl-carousel2" ]; then
sass css/owl-carousel2/owl.carousel.scss css/owl.carousel.min.css --style compressed
sass css/owl-carousel2/owl.theme.default.scss css/owl.theme.default.min.css --style compressed
elif [ "$1" == "all" ]; then
./compile bootstrap
./compile style
./compile magnific-popup
./compile owl-carousel2
else # catches "--help", "-h", and "help" too
echo -e "Usage: ./compile ${BLUE}<target>${NORMAL}"
echo
echo -e "${BOLD}bootstrap${NORMAL}"
echo -e " ${BLUE}bootstrap${NORMAL}\t\tCompiles the Bootstrap CSS from the SCSS."
echo
echo -e "${BOLD}style${NORMAL}"
echo -e " ${BLUE}style${NORMAL}\t\t\tCompiles the custom CSS from the SCSS."
echo
echo -e "${BOLD}magnific-popup${NORMAL}"
echo -e " ${BLUE}magnific-popup${NORMAL}\tCompiles the Magnific Popup CSS from the SCSS."
echo
echo -e "${BOLD}all${NORMAL}"
echo -e " ${BLUE}all${NORMAL}\t\t\tCompiles the Bootstrap SCSS and custom SCSS."
if [[ $1 == *"help"* ]] || [ "$1" == "" ]; then
exit 0
else
exit 2
fi
fi