-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·29 lines (27 loc) · 906 Bytes
/
install
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
#!/usr/bin/env bash
QUIET=0 # Default quiet mode = off
CONFIG_DIR="$HOME/.config/template-maker"
while test $# -gt 0
do
case "$1" in
"test") QUIET=1 ;; # If it receives the 'test' argument (mainly from) `template-maker test` or `brew test template-maker` then make it run quietly
*) ;; # All other arguments do nothing
esac
shift
done
if [ $QUIET == 0 ] ; then
echo "=== INSTALLATION SCRIPT STARTED ==="
echo "==> Config directory created"
fi
cd "$CONFIG_DIR" || mkdir $HOME/.config/template-maker
if [ $QUIET == 0 ] ; then
echo "==> Template files created"
fi
cp -r copy/ $HOME/.config/template-maker/copy/ 2>/dev/null
if [ $QUIET == 0 ] ; then
echo "==> Config file created"
fi
cp config $HOME/.config/template-maker/config 2>/dev/null
if [ $QUIET == 0 ] ; then
echo "=== INSTALLATION SCRIPT ENDED ==="
fi