-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDEV
More file actions
executable file
·96 lines (91 loc) · 1.63 KB
/
Copy pathDEV
File metadata and controls
executable file
·96 lines (91 loc) · 1.63 KB
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
#!/usr/bin/env bash
# shellcheck disable=SC1091,SC2154,SC2086
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PKG_GLOB="archinstoo-*.pkg.tar.zst"
go_to() {
cd "$SCRIPT_DIR/archinstoo" || exit 1
}
clean() {
local pending
pending=$(git clean -Xnd)
[[ -n "${pending}" ]] || {
echo "nothing to clean"
return 0
}
echo "${pending}"
read -rp "Proceed? [y/N] " reply
[[ "${reply}" == [yY] ]] || {
echo "aborted"
return 0
}
git clean -Xfd
}
sign() {
gpg --detach-sign $PKG_GLOB
}
verif() {
gpg --verify $PKG_GLOB.sig
}
case "$1" in
-t | --tree)
go_to
{
echo '# Project Tree'
echo '```'
tree -F -I '*.po|*.pyc|*.mo|*.png|*.svg|locales|docs|logs|__pycache__|__init__.py' | sed 's/\.py//g'
echo '```'
} >docs/README.md
;;
-c | --clean)
go_to
clean
;;
-b | --build)
go_to
makepkg -Cf
;;
-s | --sign)
go_to
sign
;;
-sv | --verify-sig)
go_to
verif
;;
-i | --install)
go_to
pacman -U --overwrite '*' $PKG_GLOB
;;
-ul | --up-logs)
go_to
curl --data-binary @./logs/install.log https://paste.rs
;;
-gl | --grep-logs)
go_to
grep -i "$2" ./logs/install.log
;;
-gc | --grep-code)
go_to
git grep -ni "$2"
;;
-tc | --test-config)
./RUN --advanced --config examples/config_sample_full.json
;;
-vc | --vm-config)
./RUN --advanced --config examples/vm_configuration.json
;;
-h2t | --host-to-target)
go_to
# this checks dependencies for dev workflow from top level PKGBUILD
. ./PKGBUILD
if [ "$2" = "-o" ] || [ "$2" = "--opt" ]; then
pacman -Sy --needed "${depends[@]}" "${optdepends[@]}"
else
pacman -Sy --needed "${depends[@]}"
fi
;;
*)
# Pass through to archinstoo
./RUN "$@" --advanced --debug
;;
esac