summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2021-01-17 03:37:50 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2021-01-17 03:39:42 (EST)
commitfcbc2bf36d668f537012be5ae05f8e452e0acd44 (patch)
tree737ee38e5fab90a9e1747ce8c13412c6c902bc30
parent455a277a2625cf94f7f8d3490b4642242228355d (diff)
cmd/install: Make suite argument optional
-rw-r--r--NEWS2
-rw-r--r--TODO1
-rw-r--r--locale/C.sh2
-rw-r--r--man/prokit-install.8in2
-rw-r--r--src/cmd/install.sh15
5 files changed, 14 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 34d6ccc..4a7f5c5 100644
--- a/NEWS
+++ b/NEWS
@@ -25,6 +25,8 @@ New features:
requested platform. The "-a" option is now only necessary if
installing ProteanOS's "dev" platform for an architecture different
from but compatible with the native architecture.
+ * "prokit install"'s "<suite>" argument is now optional. On ProteanOS
+ the default is "rel/trunk", the rolling release suite.
* "prokit build" now passes an "-a" option, if supported, to opkg to
install host-architecture non-coinstallable dependencies (such as
library development packages) when cross building.
diff --git a/TODO b/TODO
index 4508d98..65da220 100644
--- a/TODO
+++ b/TODO
@@ -2,5 +2,4 @@ Tasks for version 3.0.0
-----------------------
* `man/prokit-install.8in`: Update
-* `prokit install`: Consider making `<suite>` argument optional
* `_install_get_pkgs()`: Resolve `FIXME`
diff --git a/locale/C.sh b/locale/C.sh
index ee4e237..18cddde 100644
--- a/locale/C.sh
+++ b/locale/C.sh
@@ -86,7 +86,7 @@ There is NO WARRANTY, to the extent permitted by law.'
# src/cmd/install.sh
msg_prokit_cmd_install_summary='install a system into a directory'
msg_prokit_cmd_install_usage='[-a <arch>] [-p <plat>] [-m <mirror>] [-F] '\
-'<suite> <root>'
+'[<suite>] <root>'
# src/cmd/shell.sh
msg_prokit_cmd_shell_summary='run a shell in an isolated environment'
diff --git a/man/prokit-install.8in b/man/prokit-install.8in
index 2c68b8b..c28b051 100644
--- a/man/prokit-install.8in
+++ b/man/prokit-install.8in
@@ -6,7 +6,7 @@ prokit-install \- Install a system into a directory
.SH SYNOPSIS
\fBprokit install\fP [\fB-a\fP \fIarch\fP] [\fB-p\fP \fIplat\fP]
-[\fB-m\fP \fImirror\fP] [\fB-F\fP] \fIsuite\fP \fIroot\fP
+[\fB-m\fP \fImirror\fP] [\fB-F\fP] [\fIsuite\fP] \fIroot\fP
.SH DESCRIPTION
\fBprokit install\fP installs a basic system of \fIsuite\fP into \fIroot\fP.
diff --git a/src/cmd/install.sh b/src/cmd/install.sh
index 0e4a8b9..ecdfe8c 100644
--- a/src/cmd/install.sh
+++ b/src/cmd/install.sh
@@ -33,15 +33,20 @@ cmd_install_main()
fi
shift $((${OPTIND} - 1))
- if [ ${#} -lt 2 ]; then
+ if [ ${#} -eq 1 ]; then
+ suite=''
+ root="${1}"
+ shift 1
+ fi
+ if [ ${#} -eq 2 ]; then
+ suite="${1}"
+ root="${2}"
+ shift 2
+ else
print_cmd_usage 'install' >&2
return 1
fi
- suite="${1}"
- root="${2}"
- shift 2
-
if [ "x${suite%%:*}" != "x${suite}" ]; then
profile="${suite%%:*}"
suite="${suite#*:}"