summaryrefslogtreecommitdiff
path: root/kernel/get-deps
blob: 503a9a6442f7dbafe459915765a5d7e9d4a5f566 (plain)
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#! /bin/sh

set -e

srcdir="$(dirname "$0")"
test -z "$srcdir" && srcdir=.

cd "$srcdir"

clone_repo_commit() {
    if test -d "$2/.git"; then
        git -C "$2" reset --hard
        git -C "$2" clean -fd
        if ! git -C "$2" -c advice.detachedHead=false checkout $3; then
            rm -rf "$2"
        fi
    else
        if test -d "$2"; then
            echo "error: '$2' is not a Git repository" 1>&2
            exit 1
        fi
    fi
    if ! test -d "$2"; then
        git clone $1 "$2"
        if ! git -C "$2" -c advice.detachedHead=false checkout $3; then
            rm -rf "$2"
            exit 1
        fi
    fi
}

rm -f .deps-obtained

clone_repo_commit \
    https://codeberg.org/OSDev/freestnd-c-hdrs.git \
    freestnd-c-hdrs \
    5e11c3da645d8f203e93dc23703b14a15c5b7afc

clone_repo_commit \
    https://codeberg.org/OSDev/freestnd-cxx-hdrs.git \
    freestnd-cxx-hdrs \
    9d6a92ab19a57140f1e3ecc6668014d7f46094b6

clone_repo_commit \
    https://codeberg.org/OSDev/cc-runtime.git \
    cc-runtime \
    dae79833b57a01b9fd3e359ee31def69f5ae899b

clone_repo_commit \
    https://codeberg.org/Limine/limine-protocol.git \
    limine-protocol \
    068b6481557db836e41bf644382367f8dee76d21

clone_repo_commit \
    https://codeberg.org/Mintsuki/Flanterm.git \
    flanterm \
    26f631fcc15bb7faea83572213cae5a0287fc3de

clone_repo_commit \
    https://github.com/charlesnicholson/nanoprintf.git \
    nanoprintf \
    47af8e576556d7be9621f431e442123eccc056d3

clone_repo_commit \
    https://github.com/uACPI/uACPI.git \
    uacpi \
    e05715b2e6a3ae913aecdb86f4fd2dba30304e45

touch .deps-obtained

printf "\nDependencies obtained successfully.\n"