summaryrefslogtreecommitdiffstats
path: root/scripts/switch-branch
blob: 3890334b2961338b72c664d773951a1248e6dcb4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e

if [ x"$1" = "x" ]; then
    echo "Need a component name."
    exit 1
fi

mkdir -p config

FILENAME="branch-$1"
BRANCH="$2"
echo "$BRANCH" > config/"$FILENAME"

scripts/"$1"-clean

echo "Run ./rebuild to update the source and to compile the selected branch."