/
install
executable file
·42 lines (35 loc) · 979 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
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/usr/bin/env bash
# Created by paincompiler on 2017/08/29
# © 2017 PAINCOMPILER All RIGHTS RESERVED.
##########settings##########
set -o errexit
set -o errtrace
# set -o nounset
set -o pipefail
# set -o xtrace
##########settings##########
function finish {
# cleanup code here
echo "exit"
}
function copy_templates {
echo "============copy templates============"
templates_path="/usr/local/etc/gitmatic/templates/"
mkdir -p ${templates_path}
echo "./templates ---------------> /usr/local/etc/gitmatic/templates"
cp -R ./templates/* ${templates_path}
echo ""
}
function copy_script {
echo "============copy script============"
echo "./gitmatic ---------------> /usr/local/bin/gitmatic"
cp ./gitmatic /usr/local/bin/
echo "./init ---------------> /usr/local/bin/gitmatic_init"
cp ./init /usr/local/bin/gitmatic_init
echo ""
}
trap finish EXIT
# copy templates to etc
copy_templates
copy_script
echo "installation done"