#!/bin/sh
# $Id: unpack.sh,v 1.1 1998/12/30 19:53:07 danw Exp $
# Unpack tarballs from the install directory.

progressdots() {
        awk '(NR%10==1) { printf "." } END { print "done" }'
}

# /tmp/vars inputs:
#	INSTALL

. /tmp/vars

echo "Unpacking system files from $INSTALL"

# installlist is a shell script which exports the variable "setlist"
# as a list of files to be untarred.

. "${INSTALL}/installlist"
echo "Sets: $setlist"
for tarball in $setlist; do
	echo -n "Unpacking $tarball."
	tar -xzvpf "$INSTALL/$tarball" -C /hd --unlink | progressdots >/dev/tty
done
