-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathautogen.sh
More file actions
executable file
·31 lines (27 loc) · 899 Bytes
/
autogen.sh
File metadata and controls
executable file
·31 lines (27 loc) · 899 Bytes
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 -e
# Fetch external dependencies
if [ -d "ext" ]; then
rm -rf ext
fi
mkdir ext
# Clone the Contiki-NG repository and its submodules
echo "Cloning the Contiki-NG repository..."
git clone --quiet --progress --recursive \
https://github.com/contiki-ng/contiki-ng.git ext/contiki-ng
echo "Cloning the Contiki-NG repository...done"
# Clone the cryptoauthlib repository
echo "Cloning the CryptoAuthLib repository..."
git clone --quiet --progress --recursive \
https://github.com/pull-iot/cryptoauthlib.git ext/cryptoauthlib
echo "Cloning the CryptoAuthLib repository...done"
# Patch the repositories
PATCHDIR=patches
for dir in $(cd $PATCHDIR && find * -type d -print); do
for f in $(find $PATCHDIR/$dir -maxdepth 1 -name '*.patch' -print); do
patch=$PWD/$f
echo "Applying patch: $patch"
(cd ext/$dir/
git apply $patch
)
done
done