-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sh
41 lines (35 loc) · 1.02 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
#!/bin/bash
. utils/time_parser.sh
mapfile -t my_pkgs < my_pkgs
TOTAL_SECONDS=0
function build_package() {
local pkg="$1"
local start_time
start_time=$(date +%s)
info ">>>>>>>>> building $pkg"
if [ -e "custom/$pkg.sh" ]; then
"./custom/$pkg.sh"
elif [ -d "custom/$pkg" ]; then
#shellcheck source=custom.sh
. "$H/custom.sh"
local_custom_build "$pkg"
else
sudo -u builduser aur sync "$pkg" --no-view --no-confirm #--sign # --rm-deps
fi
local end_time
end_time=$(date +%s)
local SECONDS=$((end_time - start_time))
TOTAL_SECONDS=$((TOTAL_SECONDS + SECONDS))
info "<<<<<<<<< $pkg built, time used: $(time_parser $SECONDS)."
}
function build() {
# Setup makepkg conf
cat makepkg.conf >> /etc/makepkg.conf
sed 's/SKIPPGPCHECK=0/SKIPPGPCHECK=1/' /usr/bin/makepkg -i
H=$(pwd)
export H
for my_pkg in "${my_pkgs[@]}"; do
build_package "$my_pkg"
done
info "All builds done, time used: $(time_parser $TOTAL_SECONDS)."
}