summaryrefslogtreecommitdiff
path: root/setup.sh
blob: 3681c75c4a939ef383c9356a983cb3cb1ea21bc3 (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
#!/usr/bin/env bash

set -e

response=y
test -f env-oe.sh && read -p "Overwrite env-oe.sh with defaults? (y/N) " response
if [[ $response =~ ^y$ || $response =~ ^yes$ ]]; then
	echo "Copying default environment script..."
	cp multitech/contrib/env-oe.sh .
else
	echo "Leaving existing env-oe.sh alone."
fi

echo ""
response=y
test -f conf/local.conf && read -p "Overwrite conf/local.conf with defaults? (y/N) " response
if [[ $response =~ ^y$ || $response =~ ^yes$ ]]; then
	echo "Creating default bitbake configuration..."
	cp multitech/contrib/local.conf conf/
else
	echo "Leaving existing conf/local.conf alone."
fi

echo ""
echo "Creating user-layer..."
mkdir -p user-layer/conf
mkdir -p user-layer/recipes

echo ""
response=y
test -f user-layer/conf/layer.conf && read -p "Overwrite user-layer/conf/layer.conf with defaults? (y/N) " response
if [[ $response =~ ^y$ || $response =~ ^yes$ ]]; then
	echo "Creating default user-layer configuration..."
	cp multitech/contrib/user-layer.conf user-layer/conf/layer.conf
else
	echo "Leaving existing user-layer/conf/layer.conf alone."
fi

echo ""
echo "Creating directory structure..."
mkdir -p sources
mkdir -p build

echo ""
echo "Updating git submodules..."
git submodule update --init

echo ""
echo "Setup Done."
echo ""
echo "To build corecdp-base-image:"
echo "   source env-oe.sh"
echo "   bitbake corecdp-base-image"