Skip to content
Merged

dev #229

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .assets/provision/install_base.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ debian | ubuntu)
# install base packages
pkgs="build-essential bash-completion ca-certificates curl gawk gnupg dnsutils git iputils-tracepath jq lsb-release man-db nmap shfmt openssl tar tig tree unzip vim wget which whois"
install_pkgs apt "$pkgs"
# autoremove unnecessary packages and clean up apt cache
apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
;;
opensuse)
# refresh package index
Expand Down
2 changes: 2 additions & 0 deletions .assets/provision/install_bat.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fi

# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false
# check if package installed already using package manager
APP='bat'
case $SYS_ID in
Expand Down
2 changes: 2 additions & 0 deletions .assets/provision/install_exa.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fi

# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false
# check if package installed already using package manager
APP='exa'
case $SYS_ID in
Expand Down
2 changes: 2 additions & 0 deletions .assets/provision/install_eza.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fi

# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false
# check if package installed already using package manager
APP='eza'
case $SYS_ID in
Expand Down
14 changes: 10 additions & 4 deletions .assets/provision/install_fzf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,29 @@ fedora | opensuse)
debian | ubuntu)
dpkg -s $APP &>/dev/null && exit 0 || true
;;
*)
true
;;
esac

case $SYS_ID in
alpine)
apk add --no-cache $APP >&2 2>/dev/null
;;
arch)
pacman -Sy --needed --noconfirm $APP >&2 2>/dev/null || binary=true
pacman -Sy --needed --noconfirm $APP >&2 2>/dev/null
;;
fedora)
dnf install -y $APP >&2 2>/dev/null || binary=true
dnf install -y $APP >&2 2>/dev/null
;;
debian | ubuntu)
export DEBIAN_FRONTEND=noninteractive
apt-get update >&2 && apt-get install -y $APP >&2 2>/dev/null || binary=true
apt-get update >&2 && apt-get install -y $APP >&2 2>/dev/null
;;
opensuse)
zypper --non-interactive in -y $APP >&2 2>/dev/null || binary=true
zypper --non-interactive in -y $APP >&2 2>/dev/null
;;
*)
true
;;
esac
2 changes: 2 additions & 0 deletions .assets/provision/install_kubecolor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fi

# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false
# check if package installed already using package manager
APP='kubecolor'
case $SYS_ID in
Expand Down
2 changes: 2 additions & 0 deletions .assets/provision/install_kubectl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fi

# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false
# check if package installed already using package manager
APP='kubectl'
case $SYS_ID in
Expand Down
2 changes: 2 additions & 0 deletions .assets/provision/install_minikube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fi

# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false
# check if package installed already using package manager
APP='minikube'
case $SYS_ID in
Expand Down
13 changes: 11 additions & 2 deletions .assets/provision/install_pwsh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@ fi

# define variables
APP='pwsh'
REL=${1:-}
# TODO: remove on GA release of PowerShell 7.6
if grep -qw 'trixie' /etc/os-release 2>/dev/null; then
REL='7.6.0-rc.1'
libicu='libicu76'
else
REL=${1:-}
libicu='libicu67'
fi
# get latest release if not provided as a parameter
if [ -z "$REL" ]; then
REL="$(get_gh_release_latest --owner 'PowerShell' --repo 'PowerShell')"
Expand All @@ -37,6 +44,8 @@ fi
printf "\e[92minstalling \e[1m$APP\e[22m v$REL\e[0m\n" >&2
# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false

case $SYS_ID in
alpine)
Expand Down Expand Up @@ -76,7 +85,7 @@ fedora)
;;
debian | ubuntu)
export DEBIAN_FRONTEND=noninteractive
[ "$SYS_ID" = 'debian' ] && apt-get update >&2 && apt-get install -y libicu76 >&2 2>/dev/null || true
[ "$SYS_ID" = 'debian' ] && apt-get update >&2 && apt-get install -y "$libicu" >&2 2>/dev/null || true
# create temporary dir for the downloaded binary
TMP_DIR=$(mktemp -d -p "$HOME")
trap 'rm -fr "$TMP_DIR"' EXIT
Expand Down
2 changes: 2 additions & 0 deletions .assets/provision/install_ripgrep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ fi

# determine system id
SYS_ID="$(sed -En '/^ID.*(alpine|arch|fedora|debian|ubuntu|opensuse).*/{s//\1/;p;q}' /etc/os-release)"
# set binary flag if package manager is not supported
binary=false
# check if package installed already using package manager
APP='ripgrep'
case $SYS_ID in
Expand Down