GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Remove JMC shortcut · chrishantha/install-java@5b40c6f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • uninstall-java.sh
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎uninstall-java.sh‎

Copy file name to clipboardExpand all lines: uninstall-java.sh
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,3 +88,17 @@ if (confirm "Remove directory '$java_dist_dir'?"); then
8888
rm -rf $java_dist_dir
8989
fi
9090

91+
jdk_major_version=""
92+
93+
if [[ $java_dist_dir =~ .*jdk1\.([0-9]*).* ]]; then
94+
jdk_major_version=$(echo $java_dist_dir | sed -nE 's/.*jdk1\.([0-9]*).*/\1/p')
95+
elif [[ $java_dist_dir =~ .*jdk-([0-9]*).* ]]; then
96+
jdk_major_version=$(echo $java_dist_dir | sed -nE 's/.*jdk-([0-9]*).*/\1/p')
97+
fi
98+
99+
applications_dir="$HOME/.local/share/applications"
100+
jmc_shortcut_file="$applications_dir/jmc_$jdk_major_version.desktop"
101+
102+
if [ -f $jmc_shortcut_file ] && (confirm "Remove JMC shortcut?"); then
103+
rm $jmc_shortcut_file
104+
fi

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.