-
-
Notifications
You must be signed in to change notification settings - Fork 256
/
make.sh
45 lines (41 loc) · 803 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
#!/usr/bin/env bash
function priv_clippit
(
cat <<EOF
Usage: bash ${0} [OPTIONS]
Options:
build Build program
EOF
)
function priv_main
(
set -eo pipefail
if !(which lazbuild); then
source '/etc/os-release'
case ${ID:?} in
debian | ubuntu)
sudo apt-get update
sudo apt-get install -y lazarus
;;
esac
fi
if ((${#})); then
case ${1} in
build) pub_build ;;
esac
else
priv_clippit
fi
)
function pub_build
(
if {
pushd 'peazip-sources/dev'
}; then
lazbuild --add-package 'metadarkstyle/metadarkstyle.lpk'
lazbuild 'project_peach.lpi'
lazbuild 'project_pea.lpi'
strip peach pea
fi
)
priv_main "${@}"