summaryrefslogtreecommitdiffstats
path: root/inst
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-01-12 23:12:32 (EST)
committer P. J. McDermott <pj@pehjota.net>2018-01-12 23:12:32 (EST)
commit5525592c104928d5cf84c7ea0e00b308d7278f87 (patch)
treede3ef18074746426c5a0ed24ef24811bf16b1f1c /inst
parentc7253a8eaae25e7bbd18a19f84e8b9c1d5e1d3f1 (diff)
downloadpc-inst-5525592c104928d5cf84c7ea0e00b308d7278f87.zip
pc-inst-5525592c104928d5cf84c7ea0e00b308d7278f87.tar.gz
pc-inst-5525592c104928d5cf84c7ea0e00b308d7278f87.tar.bz2
main(): Parse package list files
Diffstat (limited to 'inst')
-rwxr-xr-xinst10
1 files changed, 6 insertions, 4 deletions
diff --git a/inst b/inst
index e5da26c..9e01655 100755
--- a/inst
+++ b/inst
@@ -3,6 +3,7 @@
set -u
host=
+postinst_pkgs=
dev=
target=
@@ -461,7 +462,7 @@ usage()
main()
{
- local host_file=
+ local host_files_pfx=
local log=
exec 3>&1
@@ -471,14 +472,15 @@ main()
return 1
fi
host="${1}"
- host_file="$(dirname "${0}")/hosts/${host}"
- if ! [ -r "${host_file}" ]; then
+ host_files_pfx="$(dirname "${0}")/hosts/${host}"
+ if ! [ -r "${host_files_pfx}" ]; then
err '%s: Unknown host' "${host}"
return 1
fi
dev="${2}"
- . "${host_file}"
+ . "${host_files_pfx}"
+ postinst_pkgs="$(sed 's/#.*$//;' "${host_files_pfx}.pkgs")"
log="$(mktemp)"
exec 4>"${log}"