Plug in missing brelse calls as to fix a bug in the FFS reload code.
[dragonfly.git] / release / scripts / src-install.sh
1 #!/bin/sh
2 #
3 # $FreeBSD: src/release/scripts/src-install.sh,v 1.6.6.2 2002/08/08 08:23:53 ru Exp $
4 # $DragonFly: src/release/scripts/Attic/src-install.sh,v 1.2 2003/06/17 04:27:21 dillon Exp $
5 #
6
7 if [ "`id -u`" != "0" ]; then
8         echo "Sorry, this must be done as root."
9         exit 1
10 fi
11 if [ $# -lt 1 ]; then
12         echo "You must specify which components of src to extract"
13         echo "possible subcomponents are:"
14         echo
15         echo "base bin contrib etc games gnu include lib libexec"
16         echo "release sbin share sys tools ubin 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 contrib etc games gnu include lib libexec release sbin 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