2023-08-23 11:54:46 -05:00
|
|
|
#!/usr/bin/env bash
|
2023-08-21 13:13:13 -05:00
|
|
|
# Exit if there's an error
|
|
|
|
set -e
|
2023-08-20 21:35:16 -05:00
|
|
|
declare -A osInfo;
|
|
|
|
osInfo[/etc/redhat-release]=yum
|
|
|
|
osInfo[/etc/arch-release]=pacman
|
|
|
|
osInfo[/etc/gentoo-release]=emerge
|
|
|
|
osInfo[/etc/SuSE-release]=zypp
|
|
|
|
osInfo[/etc/debian_version]=apt-get
|
|
|
|
osInfo[/etc/alpine-release]=apk
|
|
|
|
|
|
|
|
for f in ${!osInfo[@]}
|
|
|
|
do
|
|
|
|
if [[ -f $f ]];then
|
2023-08-21 19:04:55 -05:00
|
|
|
PACKAGE_MANAGER=${osInfo[$f]}
|
2023-08-20 21:35:16 -05:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2023-08-21 19:04:55 -05:00
|
|
|
sudo ${PACKAGE_MANAGER} install zsh -y
|
2023-08-20 21:35:16 -05:00
|
|
|
|
|
|
|
cp -r zsh-files/* ~/
|