-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
39 lines (34 loc) · 873 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
#!/usr/bin/env bash
init() {
chmod a+rw ./public/assets ./public/uploads ./protected/runtime
chmod a+rw ./protected/config/modules ./protected/config/modulesBack
cp ./protected/config/db.back.php ./protected/config/db.php
chmod a+rw ./protected/config/db.php
}
clean() {
rm -R protected/runtime/cache/*
rm -R protected/runtime/CSS/*
rm -R protected/runtime/HTML/*
rm -R protected/runtime/debug/*
rm -R protected/runtime/URI/*
rm -R protected/runtime/application.log*
rm -R public/assets/*
rm -R protected/config/modules/*
}
showHelp() {
echo "supported commands:"
echo "init - proxy to init php"
echo "clean - proxy to remove project runtime files"
}
case "$1" in
-h|--help)
showHelp
;;
*)
if [ ! -z $(type -t $1 | grep function) ]; then
$1 $2
else
showHelp
fi
;;
esac