Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c4c09f0

Browse files
committed
Added uninstalling script.
Signed-off-by: Guzio <star.master.123.mg@gmail.com>
1 parent fab0c89 commit c4c09f0

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

‎installjava‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/data/data/com.termux/files/usr/bin/bash
22

3+
#Setup
34
shopt -s expand_aliases
45
alias ee='echo -e'
56

‎uninstall_java.sh‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/data/data/com.termux/files/usr/bin/bash
2+
3+
#Setup
4+
shopt -s expand_aliases
5+
alias ee='echo -e'
6+
7+
#Greetings
8+
echo
9+
ee "\e[93mThis script will uninstall Java from Termux."
10+
echo
11+
12+
#Checking for existing Java installation
13+
if [ ! -e $PREFIX/bin/java ]
14+
then
15+
ee "\e[32mJava is not installed!"
16+
echo
17+
exit
18+
else
19+
#Actual uninstallation
20+
ee "\e[32m[*] \e[34mUnseting %JAVA_HOME%..."
21+
unset JAVA_HOME=$PREFIX/share/jdk8
22+
echo "[WARNING!!!]: THIS SCRIPT WILL UNSET THE %JAVA_HOME% >>ONLY TEMPORARILY<<!!! I STRONGLY RECOMEND YOU TO REMOVE \"export JAVA_HOME=$PREFIX/share/jdk8\" line FROM YOUR \"$HOME/.profile\" (I haven't figured out how to that in Bash) SETUP FILE AS NOT DOING THAT >>WILL<< CAUSE PROBLEMS IN SOME APPS!!!"
23+
24+
ee "\e[32m[*] \e[34mRemoving Java..."
25+
rm -drf $PREFIX/share/jdk8
26+
rm $PREFIX/bin/jar
27+
rm $PREFIX/bin/jarsigner
28+
rm $PREFIX/bin/java
29+
rm $PREFIX/bin/javac
30+
rm $PREFIX/bin/javadoc
31+
rm $PREFIX/bin/javah
32+
rm $PREFIX/bin/javap
33+
34+
echo
35+
ee "\e[32mJava was successfully uninstalled!\e[39m"
36+
echo
37+
fi

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /