-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmake.sh
executable file
·60 lines (41 loc) · 957 Bytes
/
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
#!/bin/bash
#
# Does make like things
#
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
BIN_SELF=$(readlink -f "$0")
APP_ROOT=$(dirname "$BIN_SELF")
action="${1:-}"
shift
case "$action" in
# Install or Update the System
install|update)
composer install --no-ansi --no-dev --no-progress --quiet --classmap-authoritative
npm install
./make.sh vendor-web
;;
# Get the CSS and JS Assets
vendor-web)
. vendor/openthc/common/lib/lib.sh
copy_bootstrap
copy_fontawesome
copy_jquery
# lodash
mkdir -p webroot/vendor/lodash/
cp node_modules/lodash/lodash.min.js webroot/vendor/lodash/
# htmx
mkdir -p webroot/vendor/htmx
cp node_modules/htmx.org/dist/htmx.min.js webroot/vendor/htmx/
;;
# Help, the default target
*)
echo
echo "You must supply a make command"
echo
awk '/^# [A-Z].+/ { h=$0 }; /^[a-z]+.+\)/ { printf " \033[0;49;31m%-15s\033[0m%s\n", gensub(/\)$/, "", 1, $$1), h }' "$BIN_SELF" |sort
echo
;;
esac