-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(chezmoi/gnome-ext): cleanup + no ignore
- Loading branch information
Showing
3 changed files
with
6 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
#!/bin/env bash | ||
|
||
# shellcheck disable=SC1054,SC1083 | ||
{{ if regexMatch "^gnome" .desktop_session }} | ||
set -ex | ||
|
||
echo ' | ||
██████╗ ███╗ ██╗ ██████╗ ███╗ ███╗███████╗ | ||
|
@@ -18,7 +17,6 @@ echo ' | |
╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ | ||
' | ||
_gnome_extensions_installed=( | ||
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
"[email protected]" | ||
|
@@ -46,15 +44,14 @@ fi | |
function _install_gnome_extensions() { | ||
if ! dbhostexec which gext &>/dev/null; then | ||
|
||
if [[ $(cat /proc/version | grep arch) ]]; then | ||
if [[ $(cat /proc/version | grep 'arch\|Red Hat') ]]; then | ||
|
||
if ! dbhostexec which pipx &>/dev/null; then | ||
if ! which pipx &>/dev/null; then | ||
printf "Missing pipx! Cannot install gext\n" | ||
return 1 | ||
fi | ||
|
||
dbhostexec pipx install gnome-extensions-cli | ||
dbhostexec pipx runpip gnome-extensions-cli install pygobject | ||
pipx install gnome-extensions-cli | ||
|
||
else | ||
dbhostexec pip install --upgrade gnome-extensions-cli | ||
|
@@ -64,7 +61,7 @@ function _install_gnome_extensions() { | |
echo "🚀 gext already installed!" | ||
fi | ||
|
||
_gext="$(dbhostexec which gext)" | ||
_gext="$(which gext)" | ||
|
||
for _ext in "${_gnome_extensions_removed[@]}"; do | ||
dbhostexec $_gext uninstall "${_ext}" | ||
|
@@ -78,6 +75,5 @@ function _install_gnome_extensions() { | |
_install_gnome_extensions | ||
|
||
# shellcheck disable=SC1056,SC1072,SC1083,SC1009,SC1073 | ||
{{ end -}} | ||
|
||
# vi: ft=bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters