-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathtasks
executable file
·72 lines (61 loc) · 1.55 KB
/
tasks
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
cd openwrt
echo " "
echo " ---------- "
echo " Welcome to the simple OpenWrt task system. "
echo " https://github.com/TheBootloader/openwrt-repo "
echo " ---------- "
while [ true ]; do
echo " "
echo " Possible inputs: "
echo " 1 - Clean everything (dirclean) "
echo " 2 - Update SVN/GIT and packages, and run defconfig "
echo " 3 - Run menuconfig "
echo " 4 - Run kernel_menuconfig "
echo " 5 - Build OpenWrt image (Multi-core) "
echo " 6 - Build OpenWrt image (Single-core, debug (V=99)) "
echo " (Example: Type \"35\" and press enter to run menuconfig and then build the OpenWrt image.) "
echo " "
echo -n " What do you want to do? (integer) "
read input
char=-1
while [ $char ]; do
case $char in
-1) echo " "
echo "Running tasks:"
echo "----------"
;;
1) echo "Cleaning..."
make dirclean
;;
2) echo "Updating..."
[ -d .svn ] && (svn up || exit)
[ -d .git ] && (git pull || exit)
./scripts/feeds update -a
./scripts/feeds install -a
make defconfig
;;
3) echo "Running menuconfig..."
ionice -c 3 nice -n 18 make menuconfig -j 5
;;
4) echo "Running kernel_menuconfig..."
ionice -c 3 nice -n 18 make kernel_menuconfig -j 5
;;
5) echo "Building OpenWrt image..."
ionice -c 3 nice -n 18 make world -j 5
;;
6) echo "Building OpenWrt image (debug)..."
ionice -c 3 nice -n 18 make world V=99
;;
*) echo "Invalid input: $char"
cd ..
exit
;;
esac
char=$(echo $input | head -c 1)
input=${input:1}
done
echo "----------"
sleep 1
done
cd ..