Created
August 31, 2017 08:59
-
-
Save deepankarb/5d2b138a76472d2e5e5e5bbc667127cb to your computer and use it in GitHub Desktop.
Removes *all* JDK altgernatives.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [ -z "$1" ] | |
then | |
echo "Please specify JDK path" | |
exit 1 | |
fi | |
JDK_PATH="$1" | |
JDK_APPS=( $() ) | |
for app in `find "$JDK_PATH/bin" -type f -executable` | |
do | |
app_name=$(basename $app) | |
man="$app_name"".1" | |
man_alt="$JDK_PATH""/man/man1/""$man" | |
man_path="/usr/share/man/man1/$man" | |
update-alternatives --remove-all "$app_name" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment