-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.sh
65 lines (56 loc) · 1.86 KB
/
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
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
#!/usr/bin/env bash
# ~/.sh/build.sh 20170301 - 20240904
# Copyright (C) 2015-2023 Mark Constable <markc@renta.net> (AGPL-3.0)
[[ $1 =~ '-h' ]] && echo "Usage: [bash] build.sh [path(pwd)]
Example:
su - sysadm
cd var/www/html/hcp
bash build.sh .
" && exit 1
[[ $1 ]] && cd $1
echo "<?php
declare(strict_types=1);
// netserva.php $(date -u +'%Y-%m-%d %H:%M:%S') UTC
// Copyright (C) 2015-2023 Mark Constable <markc@renta.net> (AGPL-3.0)
// This is single script concatenation of all PHP files in lib/php at
// https://github.com/markc/hcp
" >netserva.php
(
cat lib/php/db.php
cat lib/php/init.php
cat lib/php/plugin.php
cat lib/php/plugins/accounts.php
cat lib/php/plugins/auth.php
cat lib/php/plugins/dkim.php
cat lib/php/plugins/domains.php
cat lib/php/plugins/home.php
cat lib/php/plugins/infomail.php
cat lib/php/plugins/infosys.php
cat lib/php/plugins/processes.php
cat lib/php/plugins/records.php
cat lib/php/plugins/valias.php
cat lib/php/plugins/vhosts.php
cat lib/php/plugins/vmails.php
cat lib/php/theme.php
cat lib/php/themes/bootstrap5/theme.php
cat lib/php/themes/bootstrap5/accounts.php
cat lib/php/themes/bootstrap5/auth.php
cat lib/php/themes/bootstrap5/dkim.php
cat lib/php/themes/bootstrap5/domains.php
cat lib/php/themes/bootstrap5/home.php
cat lib/php/themes/bootstrap5/infomail.php
cat lib/php/themes/bootstrap5/infosys.php
cat lib/php/themes/bootstrap5/processes.php
cat lib/php/themes/bootstrap5/records.php
cat lib/php/themes/bootstrap5/valias.php
cat lib/php/themes/bootstrap5/vhosts.php
cat lib/php/themes/bootstrap5/vmails.php
cat lib/php/util.php
cat index.php
) | sed \
-e '/^?>/d' \
-e '/^<?php/d' \
-e '/^\/\/ Copyright.*/d' \
-e '/^declare(strict_types=1);/d' \
-e '/^error_log.*/,+1 d' >>netserva.php
chmod 640 netserva.php