summaryrefslogtreecommitdiff
path: root/darcs-all
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-02-07 16:53:44 +0000
committerIan Lynagh <igloo@earth.li>2007-02-07 16:53:44 +0000
commit9fd4d1e84e5a305e227db2ec78a46d1762907493 (patch)
tree4f61228ee028034484ec3637093027ef3fd54000 /darcs-all
parenta8e681c1e8aa4bc602714ff61583cd4e969d7187 (diff)
downloadhaskell-9fd4d1e84e5a305e227db2ec78a46d1762907493.tar.gz
Teach darcs-all how to get testsuite and nofib
Diffstat (limited to 'darcs-all')
-rw-r--r--darcs-all47
1 files changed, 41 insertions, 6 deletions
diff --git a/darcs-all b/darcs-all
index 69e0ff9406..8b2a68a6be 100644
--- a/darcs-all
+++ b/darcs-all
@@ -9,9 +9,11 @@ top_dirs="nofib testsuite"
defaultrepo=`cat _darcs/prefs/defaultrepo`
case $defaultrepo in
http://* | *@*:*)
- defaultrepo_lib=`echo $defaultrepo | sed 's!/ghc$!!'`/packages;;
+ defaultrepo_base="`echo $defaultrepo | sed 's!/ghc$!!'`"
+ defaultrepo_lib="$defaultrepo_base"/packages;;
/*)
- defaultrepo_lib=$defaultrepo/libraries;;
+ defaultrepo_base="$defaultrepo"
+ defaultrepo_lib="$defaultrepo"/libraries;;
esac
quiet=NO
@@ -55,6 +57,26 @@ darcsget()
additional_flag="--partial" ;;
esac
+ if test "$nofib" = "YES"; then
+ if test -d nofib; then
+ echo "warning: nofib already present; omitting"
+ else
+ repo="$defaultrepo_base"/nofib
+ message "== running darcs get $additional_flag $* $repo"
+ darcs get $additional_flag $* $repo
+ fi
+ fi
+
+ if test "$testsuite" = "YES"; then
+ if test -d testsuite; then
+ echo "warning: testsuite already present; omitting"
+ else
+ repo="$defaultrepo_base"/testsuite
+ message "== running darcs get $additional_flag $* $repo"
+ darcs get $additional_flag $* $repo
+ fi
+ fi
+
cd libraries
if test "$extra" = "YES"; then
@@ -85,10 +107,23 @@ esac
# --extra says we grab the extra libs with 'get'. It has no effect on
# the other commands.
-extra=NO;
-case $1 in
- --extra) shift; extra=YES;
-esac
+extra=NO
+# --nofib/--testsuite tell get to also grab the respective repos.
+# They have no effect on the other commands.
+nofib=NO
+testsuite=NO
+
+args_done=NO
+
+while [ "$args_done" == NO ]
+do
+ case $1 in
+ --extra) shift; extra=YES;;
+ --nofib) shift; nofib=YES;;
+ --testsuite) shift; testsuite=YES;;
+ *) args_done=YES;;
+ esac
+done
case $1 in
get) shift; darcsget $*;;