forked from pwelyn/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 2
/
get_edify_def_val
executable file
·52 lines (39 loc) · 888 Bytes
/
get_edify_def_val
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
############################################################################
#
# Copyright (c) 2011 - dsixda ([email protected])
# Copyright (c) 2014 - 越狱 (http://weibo.com/206021119)
#
# Android 厨房是100%免费。此脚本文件仅供个人或学习使用
# by hwh132 越狱 汉化
#
############################################################################
#
# 此脚本有两个强制性参数:
#
# $1 = 设备名称
# $2 = edify_defs 文件中的参数
#
device=$1
param=$2
base_dir=`pwd`
if [ ! -e tools/edify_defs/$device ]
then
value=UNKNOWN
else
cd tools/edify_defs
str=^$param=
grep_str=`grep -c $param $device`
if [ $grep_str == 0 ]
then
value=UNKNOWN
else
value=`grep -m 1 $param $device \
| sed 's/'"$param"'=//g'`
if [ "$value" == "" ]
then
value=UNKNOWN
fi
fi
cd $base_dir
fi
echo $value