GeezerVison is showing github.com — Use spaces instead of tabs. Check plugins directory for Mozilla · chrishantha/install-java@102247e
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: uninstall-java.sh +10-8Lines changed: 10 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -45,8 +45,8 @@ confirm () { |
45 | 45 |
|
46 | 46 | # Make sure the script is running as root. |
47 | 47 | if [ "$UID" -ne "0" ]; then |
48 | | - echo "You must be root to run $0. Try following"; echo "sudo $0"; |
49 | | - exit 9 |
| 48 | + echo "You must be root to run $0. Try following"; echo "sudo $0"; |
| 49 | + exit 9 |
50 | 50 | fi |
51 | 51 |
|
52 | 52 |
|
|
74 | 74 | commands=( "jar" "java" "javac" "javadoc" "javah" "javap" "javaws" "jcmd" "jconsole" "jarsigner" "jhat" "jinfo" "jmap" "jmc" "jps" "jstack" "jstat" "jstatd" "jvisualvm" "keytool" "policytool" "wsgen" "wsimport" ) |
75 | 75 |
|
76 | 76 | if (confirm "Run update-alternatives commands?"); then |
77 | | - echo "Running update-alternatives --remove for ${commands[@]} mozilla-javaplugin.so" |
| 77 | + echo "Running update-alternatives --remove for ${commands[@]} mozilla-javaplugin.so" |
78 | 78 |
|
79 | | - for i in "${commands[@]}" |
80 | | - do |
81 | | - sudo update-alternatives --remove "$i" "$java_dist_dir/bin/$i" |
82 | | - done |
| 79 | + for i in "${commands[@]}" |
| 80 | + do |
| 81 | + sudo update-alternatives --remove "$i" "$java_dist_dir/bin/$i" |
| 82 | + done |
83 | 83 |
|
84 | | - sudo update-alternatives --remove "mozilla-javaplugin.so" "$java_dist_dir/jre/lib/amd64/libnpjp2.so" |
| 84 | + if [[ -d "/usr/lib/mozilla/plugins/" ]]; then |
| 85 | + sudo update-alternatives --remove "mozilla-javaplugin.so" "$java_dist_dir/jre/lib/amd64/libnpjp2.so" |
| 86 | + fi |
85 | 87 | fi |
86 | 88 |
|
87 | 89 | if (confirm "Remove directory '$java_dist_dir'?"); then |
|