1996-01-08 07:19:45 +01:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
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
|
1996-10-10 11:22:37 +02:00
|
|
|
echo "base bin contrib etc games gnu include lib libexec lkm"
|
|
|
|
echo "release sbin share smailcf sys ubin usbin"
|
1996-01-08 07:19:45 +01:00
|
|
|
echo
|
1996-10-10 11:22:37 +02:00
|
|
|
echo "You may also specify all to extract all subcomponents."
|
1996-01-08 07:19:45 +01:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
1996-10-10 11:22:37 +02:00
|
|
|
if [ "$1" = "all" ]; then
|
|
|
|
dists="base bin contrib etc games gnu include lib libexec lkm release sbin share smailcf sys ubin usbin"
|
|
|
|
else
|
|
|
|
dists="$*"
|
|
|
|
fi
|
|
|
|
|
|
|
|
for i in $dists; do
|
1996-01-08 07:19:45 +01:00
|
|
|
echo "Extracting source component: $i"
|
|
|
|
cat s${i}.?? | tar --unlink -xpzf - -C /usr/src
|
|
|
|
done
|
|
|
|
exit 0
|