Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: chromium, opera & brave browsers with chromium set as default #13

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions src/browser/brave/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

# ----------------------------------------------------------------------
# | Init |
# ----------------------------------------------------------------------

declare DIR="$(dirname "${BASH_SOURCE[0]}")"
declare ROOT_DIR="$(realpath "$DIR/../../..")"
declare TOPIC_NAME="browser/brave"
declare TOPIC_DIR="$DOTFILES_SOURCE_DIR/$TOPIC_NAME"

source "$ROOT_DIR/scripts/utils.sh"
source "$DOTFILES_SCRIPTS_DIR/symlink_files.sh"

# ----------------------------------------------------------------------
# | Dependencies |
# ----------------------------------------------------------------------

install_dependencies() {

# Add Brave's official GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg] \
https://brave-browser-apt-release.s3.brave.com/ stable main" | \
sudo tee /etc/apt/sources.list.d/brave-browser-release.list > /dev/null
sudo apt-get update

# Install package
sudo apt-get install -y brave-browser

}

# ----------------------------------------------------------------------
# | Main |
# ----------------------------------------------------------------------

main() {

ask_for_sudo

install_dependencies

}

execute "main" "Setting up brave ..."
34 changes: 34 additions & 0 deletions src/browser/chromium/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

# ----------------------------------------------------------------------
# | Init |
# ----------------------------------------------------------------------

declare DIR="$(dirname "${BASH_SOURCE[0]}")"
declare ROOT_DIR="$(realpath "$DIR/../../..")"
declare TOPIC_NAME="browser/chromium"
declare TOPIC_DIR="$DOTFILES_SOURCE_DIR/$TOPIC_NAME"

source "$ROOT_DIR/scripts/utils.sh"
source "$DOTFILES_SCRIPTS_DIR/symlink_files.sh"

# ----------------------------------------------------------------------
# | Dependencies |
# ----------------------------------------------------------------------

install_dependencies() {

sudo apt-get update
sudo apt-get install -y chromium

}

# ----------------------------------------------------------------------
# | Main |
# ----------------------------------------------------------------------

main() {
install_dependencies
}

execute "main" "Setting up chromium ..."
50 changes: 50 additions & 0 deletions src/browser/opera/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

# ----------------------------------------------------------------------
# | Init |
# ----------------------------------------------------------------------

declare DIR="$(dirname "${BASH_SOURCE[0]}")"
declare ROOT_DIR="$(realpath "$DIR/../../..")"
declare TOPIC_NAME="browser/opera"
declare TOPIC_DIR="$DOTFILES_SOURCE_DIR/$TOPIC_NAME"

source "$ROOT_DIR/scripts/utils.sh"
source "$DOTFILES_SCRIPTS_DIR/symlink_files.sh"

# ----------------------------------------------------------------------
# | Dependencies |
# ----------------------------------------------------------------------

install_dependencies() {

# Add Opera's official GPG key:
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://deb.opera.com/archive.key | \
gpg --dearmor -o /usr/share/keyrings/opera-browser.gpg

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/opera-browser.gpg] \
http://deb.opera.com/opera/ stable non-free" | \
sudo tee /etc/apt/sources.list.d/opera-archive.list > /dev/null
sudo apt-get update

# Install package
sudo apt-get install -y opera-stable

}

# ----------------------------------------------------------------------
# | Main |
# ----------------------------------------------------------------------

main() {

ask_for_sudo

install_dependencies

}

execute "main" "Setting up brave ..."
30 changes: 30 additions & 0 deletions src/browser/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# ----------------------------------------------------------------------
# | Init |
# ----------------------------------------------------------------------

declare DIR="$(dirname "${BASH_SOURCE[0]}")"
declare ROOT_DIR="$(realpath "$DIR/../..")"
declare TOPIC_NAME="browser"
declare TOPIC_DIR="$DOTFILES_SOURCE_DIR/$TOPIC_NAME"

source "$ROOT_DIR/scripts/utils.sh"
source "$DOTFILES_SCRIPTS_DIR/setup_topics.sh"

# ----------------------------------------------------------------------
# | Choose emulator |
# ----------------------------------------------------------------------

choose_browser() {
source "$TOPIC_DIR/chromium/$TOPIC_SETUP_FILE"
}

# ----------------------------------------------------------------------
# | Main |
# ----------------------------------------------------------------------

main() {
choose_browser
}

1 change: 1 addition & 0 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ declare -a COMMANDS_TO_VERIFY=(
"git"
"docker"
"kubectl"
"chromium"
)

check_commands_existence() {
Expand Down