boot 966 Bytes
Newer Older
sven.panne@aedion.de's avatar
sven.panne@aedion.de committed
1
#! /bin/sh
2
3
set -e

4
# Create libraries/*/{ghc.mk,GNUmakefile}
5
bash boot-pkgs
6

7
# Check that we have all boot packages.
8
for dir in `grep "^[^# ][^ ]*  *[^ ][^ ]*  *[^ ][^ ]*$" packages | sed "s/ .*//"`
Ian Lynagh's avatar
Ian Lynagh committed
9
do
10
11
12
13
    # We would like to just check for an _darcs directory here, but in
    # an lndir tree we avoid making _darcs directories, so it doesn't
    # exist. We therefore require that every repo has a LICENSE file
    # instead.
Ian Lynagh's avatar
Ian Lynagh committed
14
    if test ! -f $dir/LICENSE
Ian Lynagh's avatar
Ian Lynagh committed
15
    then
Ian Lynagh's avatar
Ian Lynagh committed
16
        echo "Error: $dir/LICENSE doesn't exist." >&2
Ian Lynagh's avatar
Ian Lynagh committed
17
18
19
        echo "Maybe you haven't done './darcs-all get'?" >&2
        exit 1
    fi
20
done
21

Ian Lynagh's avatar
Ian Lynagh committed
22
23
24
25
26
27
28
29
# autoreconf everything that needs it.
for dir in . libraries/*
do
    if test -f $dir/configure.ac
    then
        echo "Booting $dir"
        ( cd $dir && autoreconf )
    fi
30
31
done

sven.panne@aedion.de's avatar
sven.panne@aedion.de committed
32
# Alas, darcs doesn't handle file permissions, so fix a few of them.
Ian Lynagh's avatar
Ian Lynagh committed
33
34
for f in boot darcs-all push-all validate
do
Ian Lynagh's avatar
Ian Lynagh committed
35
36
37
38
    if test -f $f
    then
        chmod +x $f
    fi
39
done