-
Notifications
You must be signed in to change notification settings - Fork 3
/
make.sh
executable file
·110 lines (82 loc) · 2.05 KB
/
make.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/bash
#
# Install Helper
#
# SPDX-License-Identifier: MIT
#
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
BIN_SELF=$(readlink -f "$0")
APP_ROOT=$(dirname "$BIN_SELF")
cd "$APP_ROOT"
function _clean()
{
# clean-pack
# Cleanup the Assembled JS/CSS
rm -fv ./webroot/less/app.less webroot/css/app.css webroot/css/app.css.gz
rm -fv ./webroot/js/app.js webroot/js/app.js.gz
rm -fr ./node_modules
}
function _docs()
{
mkdir -p ./webroot/doc
asciidoctor \
--verbose \
--backend=html5 \
--require=asciidoctor-diagram \
--section-numbers \
--out-file=./webroot/doc/index.html \
./doc/index.ad
# Gherkin
mkdir -p webroot/doc/
php ./test/gherkin2html.php > webroot/doc/feature-list.html
# Doxygen
doxygen
grep 'is not documented' doxygen.out > "webroot/doc/doxygen/html/no-doc.txt" || true
grep -v 'is not documented' doxygen.out > doxygen.tmp && mv doxygen.tmp doxygen.out
grep 'was not declared or defined' doxygen.out > "webroot/doc/doxygen/html/no-def.txt" || true
grep -v 'was not declared or defined' doxygen.out > doxygen.tmp && mv doxygen.tmp doxygen.out
mv doxygen.out "webroot/doc/doxygen/html/doxygen.txt"
# rsync --archive --delete "doxygen/html/" "webroot/doc/doxygen/"
}
# Do Stuff
action="${1:-}"
case "$action" in
#
# Clean up the junk
clean)
_clean
;;
#
# Make some Documentation
docs)
_docs
;;
#
# Install or Update the OpenTHC Application
install)
composer install --no-ansi --no-dev --no-progress --quiet --classmap-authoritative
npm install --quiet
. vendor/openthc/common/lib/lib.sh
copy_bootstrap
copy_fontawesome
copy_jquery
# _docs()
;;
# Help, the default target
"--help"|"help"|*)
echo
echo "You must supply a make command"
echo
awk '/^# [A-Z].+/ { h=$0 }; /^[\-0-9a-z]+\)/ { printf " \033[0;49;31m%-20s\033[0m%s\n", gensub(/\)$/, "", 1, $$1), h }' "$BIN_SELF" \
| sort
echo
esac
# https://github.com/kucherenko/jscpd
#
# #
# # Make all the things for live
# live: css-full js-full
# #git clone https://github.com/yasirsiddiqui/php-google-cloud-print.git ./lib/php-google-cloud-print