get_runtimes.sh 1.43 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /bin/sh
# $Id: get_runtimes.sh 7229 2010-03-01 11:17:32Z zalila $

usage () {
    cat <<EOF
       Usage: `basename $0` [runtime1 [runtime2 [...]]]

       Download the specified runtimes and place them in
       resources/runtime

       Examples: $0 pohiada
                 $0 PolyORB-HI-Ada
                 $0 po_hi_ada po_hi_c pok

       IMPORTANT: Any pre-existing runtimes will be overriden
EOF
}

if test $# -eq 0; then
    usage
    exit 1
fi

workdir="`pwd`"
scriptdir="`dirname $0`"; cd "${scriptdir}"; scriptdir="`pwd`"
cd ${workdir}

while test $# -ne 0; do
    r="`echo $1 | tr '[A-Z]' '[a-z]'`"
    echo $r
    case ${r} in
32
33
	*aadlib* )
	    cd ${scriptdir}/../resources/runtime || exit 2
yoogx's avatar
yoogx committed
34
35
	    rm -rf AADLib 2>/dev/null
	    git clone https://github.com/OpenAADL/AADLib.git aadlib \
36
37
38
		|| exit 2
	    ;;

39
40
41
	*po*hi*ada* )
	    cd ${scriptdir}/../resources/runtime || exit 2
	    rm -rf polyorb-hi-ada 2>/dev/null
42
	    git clone https://github.com/OpenAADL/polyorb-hi-ada.git \
43
44
45
46
47
48
		|| exit 2
	    ;;

	*po*hi*c* )
	    cd ${scriptdir}/../resources/runtime || exit 2
	    rm -rf polyorb-hi-c 2>/dev/null
49
	    git clone https://github.com/OpenAADL/polyorb-hi-c.git \
50
51
52
53
54
55
		|| exit 2
	    ;;

	*pok* )
	    cd ${scriptdir}/../resources/runtime || exit 2
	    rm -rf pok 2>/dev/null
56
            git clone https://github.com/pok-kernel/pok.git \
57
58
59
60
61
62
63
64
65
66
67
68
		|| exit 2
	    ;;

	* )
	    echo "Unknown runtime: '${1}'"
	    exit 2
	    ;;
    esac
    shift
done

exit 0