Skip to content

Commit

Permalink
minor Google Chrome code refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Xmetalfanx committed Jan 26, 2023
1 parent 539d76a commit 73229c7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions functions/universal/software/browsers/f_googlechrome.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,21 @@ function addGoogleChromeKey
# metaFunction for Google Chrome
function installChrome()
{
# this name seems wrong ... like it should not be declared here
# this name seems wrong ... like it should not be declared here
# idea: declare it as "google-chrome" or "google-chrome-stable", when needed
programName="google-chrome"
programTitle="Google Chrome"

programDownloadURL="https://dl.google.com/linux/direct/"

rpmURL="https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm"
debURL="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
baseChromeURL="https://dl.google.com/linux/direct"

rpmURL="${baseChromeURL}/google-chrome-stable_current_x86_64.rpm"
debURL="${baseChromeURL}/google-chrome-stable_current_amd64.deb"

case $distroBase in

arch) aurAppInstall google-chrome ;;
arch) aurAppInstall "${programName}" ;;

fedora|opensuse)

Expand All @@ -63,7 +65,7 @@ function installChrome()
debian|ubuntu)

if [ "${debgetInstalled}" == "yes" ]; then fancy_message action "installing ${programName}, with deb-get"; deb-get install ${programName}-stable; userPrompt; return; fi

programURL=${debURL}
metaExternalDownload ${programTitle} ${programURL}
;;
Expand Down

0 comments on commit 73229c7

Please sign in to comment.