Skip to content

Commit

Permalink
feat(ubuntu): google chrome (#16)
Browse files Browse the repository at this point in the history
* give information if program is installed

* google chrome installation option is added
  • Loading branch information
erayakgunn authored Oct 8, 2023
1 parent c6f6be4 commit d18bfd2
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
23 changes: 23 additions & 0 deletions os/linux/programs/chrome.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/bin/bash

# Check if google chrome is not installed
INSTALLED_CHROME_VERSION=$(google-chrome-stable --version)
echo $INSTALLED_CHROME_VERSION
if [ -z "$INSTALLED_CHROME_VERSION" ]; then
echo "google chrome is not installed, starting the installation..."

sudo apt update
sudo apt upgrade

sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

echo "Package installed successfully. Removing the installation file..."
sudo rm ./google-chrome-stable_current_amd64.deb

# Display a message if the installation was successful
echo "google chrome has been installed successfully."
else
echo "google chrome is already installed."
fi
exec bash
11 changes: 11 additions & 0 deletions os/linux/programs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,17 @@ export function programList(root: string) {
return false
},
},
{
label: 'google chrome',
value: 'google-chrome',
path: join(root, 'os', 'linux', 'programs', 'chrome.sh'),
dependencies: [
'wget',
],
isActive: async () => {
return false
},
},
]
return programLists
}

0 comments on commit d18bfd2

Please sign in to comment.