-
Notifications
You must be signed in to change notification settings - Fork 24
/
menuconfig.sh
executable file
·35 lines (33 loc) · 1.11 KB
/
menuconfig.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
#!/bin/bash
# simple script for executing menuconfig
# root directory of idleKernel git repo (default is this script's location)
RDIR=$(pwd)
cd $RDIR
echo "Cleaning build..."
rm -rf build
mkdir build
ARCH=arm make -s -i -C $RDIR O=build ik_defconfig menuconfig
echo "Showing differences between old config and new config"
echo "-----------------------------------------------------"
command -v colordiff >/dev/null 2>&1 && {
diff -Bwu --label "old config" arch/arm/configs/ik_defconfig --label "new config" build/.config | colordiff
} || {
diff -Bwu --label "old config" arch/arm/configs/ik_defconfig --label "new config" build/.config
echo "-----------------------------------------------------"
echo "Consider installing the colordiff package to make diffs easier to read"
}
echo "-----------------------------------------------------"
echo -n "Are you satisfied with these changes? Y/N: "
read option
case $option in
y|Y)
cp build/.config arch/arm/configs/ik_defconfig
echo "Copied new config to arch/arm/configs/ik_defconfig"
;;
*)
echo "That's unfortunate"
;;
esac
echo "Cleaning build..."
rm -rf build
echo "Done."