summaryrefslogtreecommitdiffhomepage
path: root/pkgtool.sh
diff options
context:
space:
mode:
authorLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-03-20 09:47:46 +0100
committerLucía Andrea Illanes Albornoz <lucia@luciaillanes.de>2023-03-20 09:47:46 +0100
commit3a7f9acd625d69d48cc8a8a8b04dcd7ba9b78037 (patch)
tree6b424bcfb1273a1e47ee4cfcb494d508c1c5ad8f /pkgtool.sh
parent82f78cc4ded0008991a135b944f553b54b969a0c (diff)
downloadmidipix_build-3a7f9acd625d69d48cc8a8a8b04dcd7ba9b78037.tar.bz2
midipix_build-3a7f9acd625d69d48cc8a8a8b04dcd7ba9b78037.tar.xz
Implements --theme in {build,pkgtool}.sh.
Diffstat (limited to 'pkgtool.sh')
-rwxr-xr-xpkgtool.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/pkgtool.sh b/pkgtool.sh
index a309cf9e..2faa0747 100755
--- a/pkgtool.sh
+++ b/pkgtool.sh
@@ -32,6 +32,9 @@ pkgtoolp_init() {
|| ! ex_init_getopts \
"${_pi_rstatus}" "pkgtoolp_init_getopts_fn" \
"${_pi_optstring}" "${@}" \
+ || ! ex_init_theme \
+ "${_pi_rstatus}" "${_pi_name_base}" \
+ "${ARG_THEME:-}" \
|| ! ex_init_prereqs "${_pi_rstatus}" "${_pi_prereqs}" \
|| ! ex_pkg_load_vars \
"${_pi_rstatus}" \$ARCH \$BUILD_KIND \
@@ -89,7 +92,20 @@ pkgtoolp_init_getopts_fn() {
;;
longopt)
- _ppigf_rc=1;
+ local _ppigf_verb="${1}" _ppigf_rstatus="${2#\$}" _ppigf_opt="${3}";
+
+ case "${_ppigf_opt}" in
+ --theme) shift 3;
+ if [ "${#}" != 1 ]; then
+ rtl_setrstatus "${_ppigf_rstatus}" 'missing argument to --theme option';
+ return 1;
+ else
+ ARG_THEME="${1:-}"; _ppigf_shiftfl=2;
+ fi;
+ ;;
+
+ *) _ppigf_shiftfl=0; ;;
+ esac;
;;
opt)