Zsh: Add Debian compatibility

This commit is contained in:
the_4n0nym0u53 2022-02-05 16:06:53 +01:00
parent b331a0b241
commit 46ee3f8206
No known key found for this signature in database
GPG Key ID: 35EE09F5481049BB
5 changed files with 11 additions and 8 deletions

View File

@ -11,7 +11,7 @@ $ chmod +x artix-install.sh
$ ./artix-install.sh # For Artix
$ ./fedora-install.sh # For Fedora
$ ./termux-install.sh # For Termux
$ ./ubuntu-install.sh # For Ubuntu
$ ./deb-install.sh # For Debian and Ubuntu
```
Note that I use `doas` instead of `sudo` (only on Artix). If you prefer `sudo`, then change all instances of `doas` to `sudo`, or simply create a symlink `doas` pointing to `sudo`:

View File

@ -1,7 +1,7 @@
#!/bin/sh
if [ "$(lsb_release -si)" != "Ubuntu" ]; then
echo "This script is only intended to be used for a full setup on Ubuntu. Quitting..."
if [ "$(lsb_release -si)" != "Debian" ] && [ "$(lsb_release -si)" != "Ubuntu" ]; then
echo "This script is only intended to be used for a full setup on Debian or Ubuntu. Quitting..."
exit 1
fi

View File

@ -3,18 +3,21 @@ export PATH="$PATH:$HOME/.local/bin"
(( ${+commands[go]} )) && export PATH="$PATH:$(go env GOPATH)/bin"
# Essentials
[[ $(uname -o) == "GNU/Linux" ]] \
&& [[ $(lsb_release -si) != "Debian" ]] \
&& [[ $(lsb_release -si) != "Ubuntu" ]] \
&& export LANG="en_DK.UTF-8" \
|| export LANG="en_US.UTF-8"
export PAGER="less"
export EDITOR="nano"
(( ${+commands[vim]} )) && export EDITOR="vim"
(( ${+commands[nvim]} )) && export EDITOR="nvim"
[[ $(uname -o) != "Android" ]] && [[ $(lsb_release -si) != "Ubuntu" ]] && export LANG="en_DK.UTF-8" || export LANG="en_US.UTF-8"
# Less
export LESS="-R"
export LESSHISTFILE="/dev/null"
# Tmux
[[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) == "Ubuntu" ]] && export TERM="xterm-256color"
[[ -n $TMUX ]] && export TERM="xterm-256color"
# Secret variables

View File

@ -56,7 +56,7 @@ elif [[ $(uname -o) == "GNU/Linux" ]]; then
alias dnfqs="sudo dnf list installed"
alias dnfsi="sudo dnf info"
alias dnfss="sudo dnf search"
elif [[ $(lsb_release -si) == "Ubuntu" ]]; then
elif [[ $(lsb_release -si) == "Debian" ]] || [[ $(lsb_release -si) == "Ubuntu" ]]; then
alias aptin="sudo apt install"
alias aptrm="sudo apt purge"
alias aptqi="dpkg -s"
@ -66,7 +66,7 @@ elif [[ $(uname -o) == "GNU/Linux" ]]; then
fi
# ls'ing
if [[ $(lsb_release -si) == "Ubuntu" ]]; then
if [[ $(lsb_release -si) == "Debian" ]] || [[ $(lsb_release -si) == "Ubuntu" ]]; then
alias l="ls -Ahl"
alias la="ls -hl"
alias ll="ls -aFhl"

View File

@ -1,4 +1,4 @@
if [[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) != "Ubuntu" ]]; then
if [[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) != "Debian" ]] && [[ $(lsb_release -si) != "Ubuntu" ]]; then
export GPG_TTY=$TTY
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent