Use /etc/os-release instead of lsb_release
This commit is contained in:
parent
31220d31e6
commit
0cd17de71c
|
@ -8,12 +8,12 @@ command -v stow >/dev/null 2>&1 || { echo "Please install GNU Stow!"; exit 1; }
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
echo "=> Determining OS..."
|
echo "=> Determining OS..."
|
||||||
|
|
||||||
if [ "$(lsb_release -si)" = "Fedora" ]; then
|
if [ "$(. /etc/os-release && echo $ID)" = "artix" ]; then
|
||||||
set -- "alacritty" "nvim" "scripts" "zsh"
|
|
||||||
INSTALL="pkg install"
|
|
||||||
elif [ "$(lsb_release -si)" = "Artix" ]; then
|
|
||||||
set -- "alacritty" "git" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh"
|
set -- "alacritty" "git" "mako" "nvim" "scripts" "sway" "swaylock" "swaynag" "waybar" "zsh"
|
||||||
INSTALL="sudo pacman -S"
|
INSTALL="sudo pacman -S"
|
||||||
|
elif [ "$(. /etc/os-release && echo $ID)" = "fedora" ]; then
|
||||||
|
set -- "alacritty" "nvim" "scripts" "zsh"
|
||||||
|
INSTALL="sudo dnf install"
|
||||||
else
|
else
|
||||||
echo "OS not supported!"
|
echo "OS not supported!"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/env dash
|
#!/usr/bin/env dash
|
||||||
|
|
||||||
[ "$(lsb_release -si)" = "Artix" ] && { paru -Syu; echo; }
|
[ "$(. /etc/os-release && echo $ID)" = "artix" ] && { paru -Syu; echo; }
|
||||||
[ "$(lsb_release -si)" = "Fedora" ] && { sudo dnf --refresh upgrade; echo; }
|
[ "$(. /etc/os-release && echo $ID)" = "fedora" ] && { sudo dnf --refresh upgrade; echo; }
|
||||||
|
|
||||||
command -v flatpak >/dev/null 2>&1 &&
|
command -v flatpak >/dev/null 2>&1 &&
|
||||||
{ flatpak update; echo; }
|
{ flatpak update; echo; }
|
||||||
|
|
|
@ -5,6 +5,6 @@ kill_services() {
|
||||||
pkill "^pipewire$"
|
pkill "^pipewire$"
|
||||||
}
|
}
|
||||||
|
|
||||||
[[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]] &&
|
[[ $(. /etc/os-release && echo $ID) == "artix" ]] && [[ $(tty) == "/dev/tty1" ]] &&
|
||||||
kill_services >/dev/null
|
kill_services >/dev/null
|
||||||
unfunction kill_services
|
unfunction kill_services
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
if [[ $(lsb_release -si) == "Artix" ]] && [[ $(tty) == "/dev/tty1" ]]; then
|
if [[ $(. /etc/os-release && echo $ID) == "artix" ]] && [[ $(tty) == "/dev/tty1" ]]; then
|
||||||
export XDG_CURRENT_DESKTOP="Unity"
|
export XDG_CURRENT_DESKTOP="Unity"
|
||||||
export GTK_USE_PORTAL=1
|
export GTK_USE_PORTAL=1
|
||||||
export QT_QPA_PLATFORM="wayland"
|
export QT_QPA_PLATFORM="wayland"
|
||||||
|
|
|
@ -61,7 +61,7 @@ alias q="exit 0"
|
||||||
alias visudo="sudo EDITOR=\"rvim -nc 'set nobackup nowritebackup'\" visudo"
|
alias visudo="sudo EDITOR=\"rvim -nc 'set nobackup nowritebackup'\" visudo"
|
||||||
|
|
||||||
# Platform specific
|
# Platform specific
|
||||||
if [[ $(lsb_release -si) == "Artix" ]]; then
|
if [[ $(. /etc/os-release && echo $ID) == "artix" ]]; then
|
||||||
alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
alias code="codium --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||||
alias pacin="sudo pacman -S"
|
alias pacin="sudo pacman -S"
|
||||||
alias pacls="pacman -Qkl"
|
alias pacls="pacman -Qkl"
|
||||||
|
@ -73,7 +73,7 @@ if [[ $(lsb_release -si) == "Artix" ]]; then
|
||||||
alias pacss="pacman -Ss"
|
alias pacss="pacman -Ss"
|
||||||
alias poweroff="sudo poweroff"
|
alias poweroff="sudo poweroff"
|
||||||
alias reboot="sudo reboot"
|
alias reboot="sudo reboot"
|
||||||
elif [[ $(lsb_release -si) == "Fedora" ]]; then
|
elif [[ $(. /etc/os-release && echo $ID) == "fedora" ]]; then
|
||||||
alias code="codium"
|
alias code="codium"
|
||||||
alias dnfin="sudo dnf install"
|
alias dnfin="sudo dnf install"
|
||||||
alias dnfqi="rpm -qi"
|
alias dnfqi="rpm -qi"
|
||||||
|
|
Loading…
Reference in a new issue