forked from pwelyn/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathget_build_prop_val
More file actions
executable file
·55 lines (43 loc) · 909 Bytes
/
Copy pathget_build_prop_val
File metadata and controls
executable file
·55 lines (43 loc) · 909 Bytes
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
############################################################################
#
# Copyright (c) 2011 - dsixda (dislam@rocketmail.com)
# Copyright (c) 2014 - 越狱 (http://weibo.com/206021119)
#
# Android 厨房是100%免费。此脚本文件仅供个人或学习使用
# by hwh132 越狱 汉化
#
############################################################################
#
# 此脚本有两个参数:
#
# $1 = build.prop 中的参数 (强制)
# $2 = 工作文件夹名称 (可选)
#
base_dir=`pwd`
if [ "$2" == "" ]
then
cd WORKING_*
else
cd $2
fi
if [ ! -e system/build.prop ]
then
value=UNKNOWN
else
cd system
str=^$1=
grep_str=`grep -c $str build.prop`
if [ $grep_str == 0 ]
then
value=UNKNOWN
else
value=`grep -m 1 $str build.prop \
| sed 's/'"$1"'=//g'`
if [ "$value" == "" ]
then
value=UNKNOWN
fi
fi
fi
cd $base_dir
echo $value