-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup-mirrors.sh
executable file
·101 lines (83 loc) · 2.26 KB
/
setup-mirrors.sh
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#!/usr/bin/env bash
SCRIPT_PATH="$(cd "$(dirname "$0")";pwd -P)"
MIRROR_ROOT="${SCRIPT_PATH}/../.."
MIRRORS="aosp lineage calyx muppets the-muppets"
AOSP_FOLDERS="device kernel platform toolchain tools"
for mirror in ${MIRRORS}; do
if [ ! -d ${MIRROR_ROOT}/${mirror} ] ; then
mkdir -p ${MIRROR_ROOT}/${mirror}
fi
done
pushd ${MIRROR_ROOT}/aosp
if [ ! -d .repo ] ; then
repo init -u https://android.googlesource.com/mirror/manifest --mirror
fi
if [ ! -d .repo/local_manifests ] ; then
mkdir -p .repo/local_manifests
ln -s ../../../scripts/scripts/remove-projects-aosp.xml .repo/local_manifests/remove-projects.xml
fi
if [ ! -L The-Muppets ] ; then
ln -s ../the-muppets/The-Muppets The-Muppets
fi
if [ ! -L TheMuppets ] ; then
ln -s ../muppets/TheMuppets TheMuppets
fi
if [ ! -L LineageOS ] ; then
ln -s ../lineage/LineageOS LineageOS
fi
if [ ! -L CalyxOS ] ; then
ln -s ../calyx/CalyxOS CalyxOS
fi
popd
pushd ${MIRROR_ROOT}/lineage
if [ ! -d .repo ] ; then
repo init -u https://github.com/LineageOS/mirror --mirror
fi
for aosp_folder in ${AOSP_FOLDERS}; do
if [ ! -L "${aosp_folder}" ] ; then
ln -s "../aosp/${aosp_folder}" "${aosp_folder}"
fi
done
if [ ! -L The-Muppets ] ; then
ln -s ../the-muppets/The-Muppets The-Muppets
fi
if [ ! -L TheMuppets ] ; then
ln -s ../muppets/TheMuppets TheMuppets
fi
if [ ! -L CalyxOS ] ; then
ln -s ../calyx/CalyxOS CalyxOS
fi
popd
pushd ${MIRROR_ROOT}/calyx
if [ ! -d .repo ] ; then
repo init -u https://gitlab.com/CalyxOS/mirror_manifest --mirror
fi
if [ ! -d .repo/local_manifests ] ; then
mkdir -p .repo/local_manifests
ln -s ../manifests/proprietary.xml .repo/local_manifests/proprietary.xml
fi
for aosp_folder in ${AOSP_FOLDERS}; do
if [ ! -L "${aosp_folder}" ] ; then
ln -s "../aosp/${aosp_folder}" "${aosp_folder}"
fi
done
if [ ! -L The-Muppets ] ; then
ln -s ../the-muppets/The-Muppets The-Muppets
fi
if [ ! -L TheMuppets ] ; then
ln -s ../muppets/TheMuppets TheMuppets
fi
if [ ! -L LineageOS ] ; then
ln -s ../lineage/LineageOS LineageOS
fi
popd
pushd ${MIRROR_ROOT}/muppets
if [ ! -d .repo ] ; then
repo init -u https://github.com/TheMuppets/manifests -b mirror --mirror
fi
popd
pushd ${MIRROR_ROOT}/the-muppets
if [ ! -d .repo ] ; then
repo init -u https://gitlab.com/The-Muppets/manifest -b mirror --mirror
fi
popd