#!/bin/sh -e

spt_dir=/usr/share/mspt
. $spt_dir/init

mkdir -p $out_dir $tmp_dir

[ -z "$packages" ] && packages=$profile_dir/packages
Verbose "Using package list '$packages'"
[ -r "$packages" -a -f "$packages" ] || Fatal "Unable to read packages file '$packages'"

hsh-install "$work_dir" \
	${verbose:+$verbose} \
	${quiet:+$quiet} \
	${excludedocs:+$excludedocs} \
	--save-fakeroot \
	`grep -h '^[^#]' $packages`

chmod +r $work_dir/chroot/.{host,in,out}
