1996-01-08 06:19:45 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
2001-04-08 23:09:21 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
1996-01-08 06:19:45 +00:00
|
|
|
if [ "`id -u`" != "0" ]; then
|
|
|
|
echo "Sorry, this must be done as root."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
echo "You must specify which components of src to extract"
|
|
|
|
echo "possible subcomponents are:"
|
|
|
|
echo
|
2004-08-06 08:42:05 +00:00
|
|
|
echo "base bin contrib crypto etc games gnu include krb5 lib"
|
|
|
|
echo "libexec release rescue sbin secure share sys tools ubin"
|
|
|
|
echo "usbin"
|
1996-01-08 06:19:45 +00:00
|
|
|
echo
|
1996-10-10 09:22:37 +00:00
|
|
|
echo "You may also specify all to extract all subcomponents."
|
1996-01-08 06:19:45 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
1996-10-10 09:22:37 +00:00
|
|
|
if [ "$1" = "all" ]; then
|
2004-08-06 08:42:05 +00:00
|
|
|
dists="base bin contrib crypto etc games gnu include krb5 lib libexec release rescue sbin secure share sys tools ubin usbin"
|
1996-10-10 09:22:37 +00:00
|
|
|
else
|
|
|
|
dists="$*"
|
|
|
|
fi
|
|
|
|
|
1998-09-22 08:43:10 +00:00
|
|
|
echo "Extracting sources into ${DESTDIR}/usr/src..."
|
1996-10-10 09:22:37 +00:00
|
|
|
for i in $dists; do
|
1998-09-22 08:43:10 +00:00
|
|
|
echo " Extracting source component: $i"
|
|
|
|
cat s${i}.?? | tar --unlink -xpzf - -C ${DESTDIR}/usr/src
|
1996-01-08 06:19:45 +00:00
|
|
|
done
|
1998-09-22 08:43:10 +00:00
|
|
|
echo "Done extracting sources."
|
1996-01-08 06:19:45 +00:00
|
|
|
exit 0
|