forked from dsixda/Android-Kitchen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadd_bash
More file actions
executable file
·71 lines (57 loc) · 1.42 KB
/
Copy pathadd_bash
File metadata and controls
executable file
·71 lines (57 loc) · 1.42 KB
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
############################################################################
#
# Copyright (c) 2012 - dsixda (dislam@rocketmail.com)
#
# Android Kitchen is 100% free. This script file is intended for personal
# and/or educational use only. It may not be duplicated for monetary
# benefit or any other purpose without the permission of the developer.
#
############################################################################
clear
echo
echo "----------------------------------------------------------------"
echo
echo "The Bash command shell is handy for command line completion when "
echo "using a terminal emulator (e.g. ConnectBot) on your Android"
echo "device. To start it from a shell, type: bash"
echo
echo "----------------------------------------------------------------"
echo
echo -n "Proceed with install (y/n)? (default: y): "
read do_install
if [ "$do_install" == "n" ]
then
exit 0
fi
echo
if [ -d WORKING_* ]
then
echo Found working folder
else
echo No working folder found!
exit 0
fi
cd WORKING_*
if [ ! -d system ]
then
echo "No system folder found!"
cd ..
exit 0
fi
bash_path=`find . -name bash`
if [ "$bash_path" == "" ]
then
if [ -d system/xbin ]
then
echo Found /system/xbin
else
echo Creating /system/xbin
mkdir system/xbin
fi
echo "Adding /system/xbin/bash"
cp ../tools/bash system/xbin/
else
echo "Found $bash_path"
fi
cd ..
scripts/add_bash_to_update_script