#!/usr/bin/env bash # Load local library . ./run_common.lib ZIMDIR=${HOME}/.zim packages=( starship zsh ) ### Install Zsh ### info1 ">>>>> Begin Zsh installation <<<<<" {{ if (eq .chezmoi.osRelease.id "manjaro" "arch") -}} ## install packages for package in ${packages[@]}; do if [ "$(yay -Qq $package 2> /dev/null)" != $package ]; then info2 "installing ${package}..." yay -S --noconfirm $package fi done {{ else if (eq .chezmoi.osRelease.id "debian" "ubuntu") -}} DEBIAN_FRONTEND=noninteractive packages=(${packages[@]//starship/}) ## install packages for package in ${packages[@]}; do info2 "installing ${package}..." {{- if ne .chezmoi.username "root" }} sudo -E apt-get install --yes --no-install-recommends --ignore-missing $package {{- else }} apt-get install --yes --no-install-recommends --ignore-missing $package {{- end }} done info2 "installing starship..." mist install starship-bin {{- end }} info1 ">>>>> Finish Zsh installation <<<<<" ### Config Zsh ### info1 ">>>>> Installing Zim Framework <<<<<" $(which zsh) -c "source ${ZIMDIR}/zimfw.zsh init -q" info1 ">>>>> Finish zsh installation <<<<<"