5 top_dirs="nofib testsuite"
7 # Figure out where to get the other repositories from,
8 # based on where this GHC repo came from.
9 defaultrepo=`cat _darcs/prefs/defaultrepo`
12 defaultrepo_lib=`echo $defaultrepo | sed 's!/ghc$!!'`/packages;;
14 defaultrepo_lib=$defaultrepo/libraries;;
21 if [ "$quiet" = "NO" ]; then
28 message "== running darcs $* at the top level"
30 for dir in $top_dirs; do
31 if test -d $dir -a -d $dir/_darcs; then
32 message "== running darcs $* in $dir"
33 darcs $* --repodir $dir
35 message "== $dir not present or not a repository; skipping"
38 for pkg in `cat libraries/core-packages libraries/extra-packages`; do
39 if test -d libraries/$pkg; then
40 message "== running darcs $* in libraries/$pkg"
41 darcs $* --repodir libraries/$pkg
43 echo "warning: $pkg doesn't seem to exist, use 'darcs-all get' to get it"
51 *--complete*|*--partial*)
54 echo "warning: adding --partial, to override use --complete"
55 additional_flag="--partial" ;;
60 if test "$extra" = "YES"; then
61 packages=`cat core-packages extra-packages`
63 packages=`cat core-packages`
66 for pkg in $packages; do
68 echo "warning: $pkg already present; omitting"
70 repo=$defaultrepo_lib/$pkg
71 message "== running darcs get $additional_flag $* $repo"
72 darcs get $additional_flag $* $repo
77 if test ! -d _darcs -o ! -d compiler; then
78 echo "error: darcs-all must be run from the top level of the ghc tree."
86 # --extra says we grab the extra libs with 'get'. It has no effect on
90 --extra) shift; extra=YES;
94 get) shift; darcsget $*;;
95 # Hack around whatsnew failing if there are no changes
96 w|wh|wha|what|whats|whatsn|whatsne|whatsnew) set +e; darcsall $*;;