machine_setup/setup/install.sh

54 lines
938 B
Bash
Raw Normal View History

2024-01-21 17:43:30 +00:00
#!/bin/bash
2024-01-21 17:22:26 +00:00
unameOut="$(uname -s)"
case "${unameOut}" in
Linux*)
machine=Linux;;
Darwin*)
machine=Mac;;
CYGWIN*)
machine=Cygwin;;
MINGW*)
machine=MinGw;;
MSYS_NT*)
machine=Git;;
*)
machine="UNKNOWN:${unameOut}"
esac
if [ "$machine" = "Mac" ]
then
2024-01-21 18:41:43 +00:00
pkg_manager='brew'
2024-01-21 17:22:26 +00:00
echo "Installing brew package manager"
bash realpath program/package_manager/brew/install_brew.sh
fi
if [ "$machine" = "Linux" ]
then
2024-01-21 18:41:43 +00:00
pkg_manager="apt"
2024-01-21 17:22:26 +00:00
fi
2024-01-21 17:43:30 +00:00
echo "Installing ${pkg_manager} packages"
bash program/package_manager/${pkg_manager}/packages.sh
if [ -f program/package_manager/${pkg_manager}/others ]
2024-01-21 17:22:26 +00:00
then
2024-01-21 17:43:30 +00:00
for file in program/package_manager/${pkg_manager}/others/*.sh
2024-01-21 17:22:26 +00:00
do
bash ${file}
done
fi
echo "Installing side packages"
2024-01-21 17:43:30 +00:00
for file in others/**/*.sh
2024-01-21 17:22:26 +00:00
do
bash ${file}
done
echo "Installing dotfiles"
2024-01-21 17:43:30 +00:00
for file in dotfiles/**/*.sh
2024-01-21 17:22:26 +00:00
do
bash ${file}
done