mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-15 23:05:49 +01:00
80585f3426
specified as the distribution. PR: 18927 Submitted by: Stephen J. Roznowski <sjr@home.net>
31 lines
772 B
Bash
Executable File
31 lines
772 B
Bash
Executable File
#!/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
|
|
echo "base bin contrib etc games gnu include lib libexec"
|
|
echo "release sbin share sys tools ubin usbin"
|
|
echo
|
|
echo "You may also specify all to extract all subcomponents."
|
|
exit 1
|
|
fi
|
|
|
|
if [ "$1" = "all" ]; then
|
|
dists="base bin contrib etc games gnu include lib libexec release sbin share sys tools ubin usbin"
|
|
else
|
|
dists="$*"
|
|
fi
|
|
|
|
echo "Extracting sources into ${DESTDIR}/usr/src..."
|
|
for i in $dists; do
|
|
echo " Extracting source component: $i"
|
|
cat s${i}.?? | tar --unlink -xpzf - -C ${DESTDIR}/usr/src
|
|
done
|
|
echo "Done extracting sources."
|
|
exit 0
|