forked from laufersteppenwolf/kernel-tools
/
menu
executable file
·58 lines (56 loc) · 2.03 KB
/
menu
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
#!/bin/bash
export TOPDIR=$(cd $(dirname "$0"); pwd)
cd $TOPDIR
export K_VER=0.3.1
export KITCHEN=$TOPDIR/menu
export INDIR=$TOPDIR/input
export OUTDIR=$TOPDIR/output
echo "=============================================================="
echo " Welcome to ANDROID KERNEL KITCHEN $K_VER "
echo " by championswimmer "
echo "--------------------------------------------------------------"
echo "your current kitchen configurations are : - "
echo " System =" $(uname -s)
echo " Architecture =" $(uname -m)
echo " kitchen directory =" $TOPDIR
echo " input directory =" $INDIR
echo " output directory =" $OUTDIR
echo " gcc version =" $(gcc -dumpversion)
echo " perl binary =" $(command -v perl)
echo " 7z binary =" $(command -v 7z)
echo " gzip binary =" $(command -v gzip)
echo " gunzip binary =" $(command -v gunzip)
echo " Imagemagick binary =" $(command -v convert)
echo " current user =" $(whoami)
echo "--------------------------------------------------------------"
echo " If any of the above mentioned information is incorrect or "
echo " the field is empty, then kernel kitchen may not work "
echo " properly."
echo "=============================================================="
read -p "Press [ENTER] to continue"
clear
echo
echo "The kitchen can perform the following functions"
echo
echo "1. Work with boot.img files (extract or build)"
echo "2. Work with kernel.sin and ftf files (extract or build) for Xperia"
echo "3. Work with kernel.elf files (extract or build) for Xperia 2012 devices"
echo "4. Work with init ramdisk (compress or extract)"
echo "5. Editing bootsplash images"
echo
echo "Q. Quit kitchen"
echo
echo " Enter desired option number (without . after it) and press enter"
read OPT
export DO=$TOPDIR/menuscripts
case $OPT in
1) $DO/bootimg ;;
2) $DO/sinftf ;;
3) $DO/elf ;;
4) $DO/ramdisk ;;
5) $DO/bootsplash ;;
Q) clear; echo "Goodbye"; read; exit;;
q) clear; echo "Goodbye"; read; exit;;
esac
clear
$KITCHEN