]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - release/scripts/src-install.sh
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / release / scripts / src-install.sh
1 #!/bin/sh
2 #
3 # $FreeBSD$
4 #
5
6 if [ "`id -u`" != "0" ]; then
7         echo "Sorry, this must be done as root."
8         exit 1
9 fi
10 if [ $# -lt 1 ]; then
11         echo "You must specify which components of src to extract"
12         echo "possible subcomponents are:"
13         echo
14         echo "base bin cddl contrib crypto etc games gnu include krb5"
15         echo "lib libexec release rescue sbin secure share sys tools ubin"
16         echo "usbin"
17         echo
18         echo "You may also specify all to extract all subcomponents."
19         exit 1
20 fi
21
22 if [ "$1" = "all" ]; then
23         dists="base bin cddl contrib crypto etc games gnu include krb5 lib libexec release rescue sbin secure share sys tools ubin usbin"
24 else
25         dists="$*"
26 fi
27
28 echo "Extracting sources into ${DESTDIR}/usr/src..."
29 for i in $dists; do
30         echo "  Extracting source component: $i"
31         cat s${i}.?? | tar --unlink -xpzf - -C ${DESTDIR}/usr/src
32 done
33 echo "Done extracting sources."
34 exit 0