diff options
author | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-04-05 09:27:49 +0100 |
---|---|---|
committer | Lucio Andrés Illanes Albornoz <lucio@lucioillanes.de> | 2021-04-05 09:27:49 +0100 |
commit | 22d13912cfe1a45813eda153ade22541c208fcd8 (patch) | |
tree | 992c776dfbc33c4c7bb340fd12035ce231b002c7 /subr | |
parent | 0a62c5f434b8822379cd1b3814f12016c2ee6d3d (diff) | |
download | midipix_build-22d13912cfe1a45813eda153ade22541c208fcd8.tar.bz2 midipix_build-22d13912cfe1a45813eda153ade22541c208fcd8.tar.xz |
pkgtool.sh:pkgtool{,p_mirror}(): split -m <dname1>,<dname2> into -m <dname> -M <dname> for convenience.
subr/pkgtool_init.subr: split -m <dname1>,<dname2> into -m <dname> -M <dname> for convenience.
etc/{pkgtool.usage,README.md}: updated.
Diffstat (limited to 'subr')
-rw-r--r-- | subr/pkgtool_init.subr | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/subr/pkgtool_init.subr b/subr/pkgtool_init.subr index b33795ee..00a7367b 100644 --- a/subr/pkgtool_init.subr +++ b/subr/pkgtool_init.subr @@ -5,11 +5,11 @@ pkgtoolp_init_args() { local _rc=0; _status=""; if [ "$((${ARG_INFO:-0} + ${ARG_MIRROR:-0} + ${ARG_RDEPENDS:-0} + ${ARG_SHELL:-0} + ${ARG_TARBALL:-0}))" -gt 1 ]; then - cat etc/pkgtool.usage; _rc=1; _status="Error: only one of -i, -r, -s, or -t must be specified."; + cat etc/pkgtool.usage; _rc=1; _status="Error: only one of -i, -m and/or -M, -r, -s, or -t must be specified."; elif [ "$((${ARG_INFO:-0} + ${ARG_MIRROR:-0} + ${ARG_RDEPENDS:-0} + ${ARG_SHELL:-0} + ${ARG_TARBALL:-0}))" -eq 0 ]\ && [ -z "${ARG_RESTART_AT}" ]\ && [ "${ARG_UPDATE_DIFF:-0}" -eq 0 ]; then - cat etc/pkgtool.usage; _rc=1; _status="Error: one of -i, -m, -r, -s, or -t must be specified."; + cat etc/pkgtool.usage; _rc=1; _status="Error: one of -i, -m and/or -M, -r, -s, or -t must be specified."; else _rc=0; export TMP="${BUILD_WORKDIR}" TMPDIR="${BUILD_WORKDIR}"; fi; return "${_rc}"; }; @@ -30,7 +30,8 @@ pkgtoolp_init_env() { pkgtoolp_init_getopts() { local _opt="" _shiftfl=0 _rc=0 OPTIND=0; _status=""; : ${ARCH:="nt64"}; : ${BUILD_KIND:="debug"}; - ARG_INFO=0; ARG_MIRROR=0; ARG_MIRROR_DNAME=""; ARG_RESTART_AT=""; ARG_RDEPENDS=0; ARG_UPDATE_DIFF=0; ARG_SHELL=0; ARG_TARBALL=0; + ARG_INFO=0; ARG_MIRROR=0; ARG_MIRROR_DNAME=""; ARG_MIRROR_DNAME_GIT=""; + ARG_RESTART_AT=""; ARG_RDEPENDS=0; ARG_UPDATE_DIFF=0; ARG_SHELL=0; ARG_TARBALL=0; while [ "${#}" -gt 0 ]; do case "${1}" in --update-diff) @@ -48,13 +49,14 @@ pkgtoolp_init_getopts() { break; elif [ "${_shiftfl:-0}" -gt 0 ]; then shift "${_shiftfl}"; continue; - elif getopts a:b:him:rst _opt; then + elif getopts a:b:him:M:rst _opt; then case "${_opt}" in a) ARCH="${OPTARG}"; ;; b) BUILD_KIND="${OPTARG}"; ;; h) cat etc/pkgtool.usage; exit 0; ;; i) ARG_INFO=1; ;; m) ARG_MIRROR=1; ARG_MIRROR_DNAME="${OPTARG}"; ;; + M) ARG_MIRROR=1; ARG_MIRROR_DNAME_GIT="${OPTARG}"; ;; r) ARG_RDEPENDS=1; ;; s) ARG_SHELL=1; ;; t) ARG_TARBALL=1; ;; |