Zsh: Add Debian compatibility
This commit is contained in:
parent
b331a0b241
commit
46ee3f8206
|
@ -11,7 +11,7 @@ $ chmod +x artix-install.sh
|
||||||
$ ./artix-install.sh # For Artix
|
$ ./artix-install.sh # For Artix
|
||||||
$ ./fedora-install.sh # For Fedora
|
$ ./fedora-install.sh # For Fedora
|
||||||
$ ./termux-install.sh # For Termux
|
$ ./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`:
|
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`:
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ "$(lsb_release -si)" != "Ubuntu" ]; then
|
if [ "$(lsb_release -si)" != "Debian" ] && [ "$(lsb_release -si)" != "Ubuntu" ]; then
|
||||||
echo "This script is only intended to be used for a full setup on Ubuntu. Quitting..."
|
echo "This script is only intended to be used for a full setup on Debian or Ubuntu. Quitting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -3,18 +3,21 @@ export PATH="$PATH:$HOME/.local/bin"
|
||||||
(( ${+commands[go]} )) && export PATH="$PATH:$(go env GOPATH)/bin"
|
(( ${+commands[go]} )) && export PATH="$PATH:$(go env GOPATH)/bin"
|
||||||
|
|
||||||
# Essentials
|
# 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 PAGER="less"
|
||||||
export EDITOR="nano"
|
export EDITOR="nano"
|
||||||
(( ${+commands[vim]} )) && export EDITOR="vim"
|
(( ${+commands[vim]} )) && export EDITOR="vim"
|
||||||
(( ${+commands[nvim]} )) && export EDITOR="nvim"
|
(( ${+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
|
# Less
|
||||||
export LESS="-R"
|
export LESS="-R"
|
||||||
export LESSHISTFILE="/dev/null"
|
export LESSHISTFILE="/dev/null"
|
||||||
|
|
||||||
# Tmux
|
# Tmux
|
||||||
[[ $(uname -o) == "GNU/Linux" ]] && [[ $(lsb_release -si) == "Ubuntu" ]] && export TERM="xterm-256color"
|
|
||||||
[[ -n $TMUX ]] && export TERM="xterm-256color"
|
[[ -n $TMUX ]] && export TERM="xterm-256color"
|
||||||
|
|
||||||
# Secret variables
|
# Secret variables
|
||||||
|
|
|
@ -56,7 +56,7 @@ elif [[ $(uname -o) == "GNU/Linux" ]]; then
|
||||||
alias dnfqs="sudo dnf list installed"
|
alias dnfqs="sudo dnf list installed"
|
||||||
alias dnfsi="sudo dnf info"
|
alias dnfsi="sudo dnf info"
|
||||||
alias dnfss="sudo dnf search"
|
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 aptin="sudo apt install"
|
||||||
alias aptrm="sudo apt purge"
|
alias aptrm="sudo apt purge"
|
||||||
alias aptqi="dpkg -s"
|
alias aptqi="dpkg -s"
|
||||||
|
@ -66,7 +66,7 @@ elif [[ $(uname -o) == "GNU/Linux" ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ls'ing
|
# ls'ing
|
||||||
if [[ $(lsb_release -si) == "Ubuntu" ]]; then
|
if [[ $(lsb_release -si) == "Debian" ]] || [[ $(lsb_release -si) == "Ubuntu" ]]; then
|
||||||
alias l="ls -Ahl"
|
alias l="ls -Ahl"
|
||||||
alias la="ls -hl"
|
alias la="ls -hl"
|
||||||
alias ll="ls -aFhl"
|
alias ll="ls -aFhl"
|
||||||
|
|
|
@ -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 GPG_TTY=$TTY
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||||
gpgconf --launch gpg-agent
|
gpgconf --launch gpg-agent
|
||||||
|
|
Loading…
Reference in a new issue