aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/BuildIt.sh
blob: fdcb74749b3ac5bc4887802ea5522dd49e8ce9ee (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
#!/bin/bash

# Poor mans git sub modules / subtrees, coz otherwise it gets complex.
if [ ! -d src/git-sub-modules/toybox ]; then
    pushd src/git-sub-modules
    git clone https://github.com/landley/toybox.git
    popd
else
    pushd src/git-sub-modules/toybox
    git pull
    popd
fi

pushd src/git-sub-modules/toybox
#git stash save
#git pull
#git stash pop
popd

mkdir -p build
rm -fr 					build/toybox
cp -r src/git-sub-modules/toybox	build/
ln -fs ../../../src/boxes		build/toybox/toys/boxes
ln -fs ../toys/boxes/handlekeys.c	build/toybox/lib
ln -fs ../toys/boxes/handlekeys.h	build/toybox/lib

pushd build/toybox >/dev/null
make clean
#make defconfig
##make menuconfig
make allnoconfig KCONFIG_ALLCONFIG=../../miniconfig || exit 1
make  || exit 1
popd >/dev/null