File tree Expand file tree Collapse file tree 5 files changed +21
-33
lines changed
Expand file tree Collapse file tree 5 files changed +21
-33
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -o pipefail
4+
5+ # #? Open Google Chrome in different operating systems
6+ # #?
7+ # #? Usage:
8+ # #? chrome [<url>...]
9+
10+ source " $DOTFILES_PATH /scripts/core/_main.sh"
11+
12+ if platform::is_macos; then
13+ open -a " Google Chrome" " $@ "
14+ elif platform::is_linux; then
15+ google-chrome " $@ "
16+ else
17+ log::error " Unsupported platform"
18+ exit 1
19+ fi
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ if platform::command_exists apt-mark; then
7272 _apt_import
7373fi
7474
75- if ! platform::is_wsl && platform::command_exists snap; then
75+ if platform::command_exists snap; then
7676 log::info " π₯ Installing snap packages"
7777 _snap_import
7878fi
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ install_requirements() {
1010 elif platform::is_macos; then
1111 log::info " π Setting up MacOS platform"
1212 _install_macos_requirements
13- elif platform::is_wsl; then
14- log::info" π Setting up WSL platform"
15- _install_wsl_requirements
1613 fi
1714}
1815
@@ -51,14 +48,3 @@ _install_linux_requirements() {
5148 _install_apt_package gcc
5249 fi
5350}
54-
55- _install_wsl_requirements () {
56- _install_apt_package () {
57- sudo apt-get install -y $1 2>&1 | log::file " π¦ Installing apt $1 "
58- }
59-
60- if platform::command_exists apt-mark; then
61- _install_apt_package zsh
62- _install_apt_package gcc
63- fi
64- }
Original file line number Diff line number Diff line change @@ -19,9 +19,6 @@ update_system() {
1919 elif platform::is_macos; then
2020 log::info " π Updating MacOS platform"
2121 _update_macos 2>&1 | log::file " π Updating MacOS platform"
22- elif platform::is_wsl; then
23- log::info" π Updating WSL platform"
24- _update_wsl 2>&1 | log::file " π Updating WSL platform"
2522 fi
2623}
2724
@@ -44,17 +41,3 @@ _update_linux() {
4441 brew update && brew upgrade && brew cleanup
4542 fi
4643}
47-
48- _update_wsl () {
49- if platform::command_exists apt-mark; then
50- sudo apt-get update -y
51- sudo apt-get upgrade -y
52- sudo apt-get autoremove -y
53- fi
54- if platform::command_exists snap; then
55- sudo snap refresh
56- fi
57- if platform::command_exists brew; then
58- brew update && brew upgrade && brew cleanup
59- fi
60- }
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ _pathadd() {
77export EDITOR=' vim'
88
99# Default browser
10- export BROWSER=' google- chrome'
10+ export BROWSER=" $DOTFILES_PATH /bin/ chrome"
1111
1212# Default pager
1313export PAGER=' less'
You canβt perform that action at this time.
0 commit comments