[bugfix] ubuntu release env-var / bat not working
This commit is contained in:
parent
c59ea9601b
commit
3a46ca0e67
|
@ -14,13 +14,6 @@ case "$PM" in
|
||||||
openssh-client \
|
openssh-client \
|
||||||
curl wget \
|
curl wget \
|
||||||
man sudo
|
man sudo
|
||||||
if [ -f /etc/lsb-release ]; then
|
|
||||||
set -a
|
|
||||||
. /etc/lsb-release
|
|
||||||
set +a
|
|
||||||
export DISTRIB_RELEASE_MAJOR=${DISTRIB_RELEASE%.*}
|
|
||||||
export DISTRIB_RELEASE_MINOR=${DISTRIB_RELEASE#.*}
|
|
||||||
fi
|
|
||||||
;;
|
;;
|
||||||
pacman)
|
pacman)
|
||||||
sudo pacman -S --noconfirm --needed \
|
sudo pacman -S --noconfirm --needed \
|
||||||
|
|
16
cli/fish.sh
16
cli/fish.sh
|
@ -7,13 +7,15 @@ DIR=$(dirname "$(readlink -f "$0")")
|
||||||
log 'Setting up shell'
|
log 'Setting up shell'
|
||||||
case "$PM" in
|
case "$PM" in
|
||||||
apt)
|
apt)
|
||||||
sudo add-apt-repository ppa:fish-shell/release-3 -y
|
sudo add-apt-repository ppa:fish-shell/release-3 -y -n
|
||||||
pm_update
|
pm_update
|
||||||
sudo apt install fish silversearcher-ag -y
|
sudo apt install fish silversearcher-ag -y
|
||||||
|
echo DISTRIB_RELEASE_MAJOR: $DISTRIB_RELEASE_MAJOR
|
||||||
|
echo DISTRIB_RELEASE: $DISTRIB_RELEASE
|
||||||
if [ "$DISTRIB_RELEASE_MAJOR" -gt 19 ] || [ "$DISTRIB_RELEASE" = "19.10" ]; then
|
if [ "$DISTRIB_RELEASE_MAJOR" -gt 19 ] || [ "$DISTRIB_RELEASE" = "19.10" ]; then
|
||||||
sudo apt install dash bat -y
|
sudo apt install dash bat -y
|
||||||
fi
|
fi
|
||||||
lnsf /usr/bin/batcat /usr/bin/bat
|
sudo ln -sf /usr/bin/batcat /usr/bin/bat
|
||||||
intorepo https://github.com/junegunn/fzf.git "$HOME/.fzf"
|
intorepo https://github.com/junegunn/fzf.git "$HOME/.fzf"
|
||||||
./install --all
|
./install --all
|
||||||
exitrepo
|
exitrepo
|
||||||
|
@ -39,16 +41,6 @@ case "$PM" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|
||||||
if has_cmd bat; then
|
|
||||||
log 'Setting up bat'
|
|
||||||
BAT_THEMES="$(bat --config-dir)/themes"
|
|
||||||
BAT_GRUVBOX="$BAT_THEMES/gruvbox"
|
|
||||||
if [ ! -d "$BAT_GRUVBOX" ]; then
|
|
||||||
mkdir -p "$BAT_THEMES"
|
|
||||||
git_clone https://github.com/peaceant/gruvbox.git "$BAT_GRUVBOX"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# only for local machine with gui
|
# only for local machine with gui
|
||||||
if [ -z "$SSH_CLIENT" ] && [ -n "$DISPLAY" ] && has_cmd dash; then
|
if [ -z "$SSH_CLIENT" ] && [ -n "$DISPLAY" ] && has_cmd dash; then
|
||||||
log 'Setting up dash as default shell'
|
log 'Setting up dash as default shell'
|
||||||
|
|
|
@ -23,7 +23,7 @@ if status is-interactive
|
||||||
set -gx LS_COLORS 'ow=34;42;40'
|
set -gx LS_COLORS 'ow=34;42;40'
|
||||||
|
|
||||||
# === bat configuration
|
# === bat configuration
|
||||||
set -gx BAT_THEME 'gruvbox'
|
set -gx BAT_THEME 'OneHalfDark'
|
||||||
set -gx MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
set -gx MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||||
|
|
||||||
# === dict.sh configuration
|
# === dict.sh configuration
|
||||||
|
|
|
@ -29,7 +29,7 @@ if ! has_cmd "$VIM"; then
|
||||||
#fi
|
#fi
|
||||||
|
|
||||||
# gui-common is required for clipboard integration
|
# gui-common is required for clipboard integration
|
||||||
sudo add-apt-repository ppa:jonathonf/vim -y
|
sudo add-apt-repository ppa:jonathonf/vim -y -n
|
||||||
pm_update
|
pm_update
|
||||||
sudo apt install -y vim vim-gui-common
|
sudo apt install -y vim vim-gui-common
|
||||||
if enhance_vim; then
|
if enhance_vim; then
|
||||||
|
|
|
@ -19,9 +19,9 @@ case "$PM" in
|
||||||
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
|
sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600
|
||||||
sudo apt-key adv --fetch-keys \
|
sudo apt-key adv --fetch-keys \
|
||||||
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
|
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
|
||||||
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /"
|
sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" -y -n
|
||||||
sudo apt-get update
|
pm_update
|
||||||
sudo apt-get -y install cuda
|
sudo apt -y install cuda
|
||||||
elif [ "$DISTRIB_RELEASE" = "20.04" ]; then
|
elif [ "$DISTRIB_RELEASE" = "20.04" ]; then
|
||||||
sudo apt install nvidia-cuda-toolkit
|
sudo apt install nvidia-cuda-toolkit
|
||||||
else
|
else
|
||||||
|
|
10
env.sh
10
env.sh
|
@ -80,7 +80,7 @@ enhance_vim() {
|
||||||
pm_update() {
|
pm_update() {
|
||||||
# skip updation on daily basis
|
# skip updation on daily basis
|
||||||
TSFILE=/tmp/apt_updated_at_$(date +%Y%m%d)
|
TSFILE=/tmp/apt_updated_at_$(date +%Y%m%d)
|
||||||
CHECKSUM=$(md5sum $(find /etc/apt -type f | sort))
|
CHECKSUM=$(md5sum /etc/apt/sources.list /etc/apt/sources.list.d/*.list | sort | md5sum)
|
||||||
grep -qF "$CHECKSUM" "$TSFILE" && return
|
grep -qF "$CHECKSUM" "$TSFILE" && return
|
||||||
case "$PM" in
|
case "$PM" in
|
||||||
apt)
|
apt)
|
||||||
|
@ -107,6 +107,13 @@ if [ "$PM" = "n/a" ]; then
|
||||||
echo "Unsupported Package Manager"
|
echo "Unsupported Package Manager"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
if [ -f /etc/lsb-release ]; then
|
||||||
|
set -a
|
||||||
|
. /etc/lsb-release
|
||||||
|
set +a
|
||||||
|
export DISTRIB_RELEASE_MAJOR=${DISTRIB_RELEASE%.*}
|
||||||
|
export DISTRIB_RELEASE_MINOR=${DISTRIB_RELEASE#.*}
|
||||||
|
fi
|
||||||
|
|
||||||
log "Environments"
|
log "Environments"
|
||||||
echo " PM : $PM"
|
echo " PM : $PM"
|
||||||
|
@ -114,4 +121,3 @@ echo " DIR : $DIR"
|
||||||
echo " PDIR : $PDIR"
|
echo " PDIR : $PDIR"
|
||||||
echo " PREFIX : $PREFIX"
|
echo " PREFIX : $PREFIX"
|
||||||
echo " GITHUB_PROXY : $GITHUB_PROXY"
|
echo " GITHUB_PROXY : $GITHUB_PROXY"
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,10 @@ log 'Settingup office tools: libreoffice keepassxc nextcloud chrome zathura gimp
|
||||||
|
|
||||||
case "$PM" in
|
case "$PM" in
|
||||||
apt)
|
apt)
|
||||||
sudo add-apt-repository -y ppa:libreoffice/libreoffice-7-0
|
sudo add-apt-repository -y -n ppa:libreoffice/libreoffice-7-0
|
||||||
sudo add-apt-repository -y ppa:phoerious/keepassxc
|
sudo add-apt-repository -y -n ppa:phoerious/keepassxc
|
||||||
sudo add-apt-repository -y ppa:nextcloud-devs/client
|
sudo add-apt-repository -y -n ppa:nextcloud-devs/client
|
||||||
sudo apt update
|
pm_update
|
||||||
sudo apt install -y \
|
sudo apt install -y \
|
||||||
google-chrome-stable \
|
google-chrome-stable \
|
||||||
zathura zathura-pdf-poppler sxiv \
|
zathura zathura-pdf-poppler sxiv \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user