83 lines
1.7 KiB
83 lines
1.7 KiB
#!/bin/bash
|
|
|
|
COMMON_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
|
|
|
package_manager="none"
|
|
|
|
# arg($1) = Program's name
|
|
install_prog()
|
|
{
|
|
color_start "themeInstall"
|
|
echo "--> $1"
|
|
echo " |--> Will Be Installed"
|
|
echo ""
|
|
color_stop
|
|
$package_manager $1
|
|
}
|
|
|
|
# arg($1) = Program's name
|
|
skip_prog()
|
|
{
|
|
color_start "themeSkip"
|
|
echo "--> $1"
|
|
echo " |--> Was found and will not be installed"
|
|
echo ""
|
|
color_stop
|
|
}
|
|
|
|
#arg($1) = Package manager
|
|
common_install()
|
|
{
|
|
color_start "themeIndication"
|
|
echo "-----------------------------------------------------------"
|
|
echo "Common installations these programs are OS independent from"
|
|
echo "-----------------------------------------------------------"
|
|
color_stop
|
|
sleep 1
|
|
for i in "${!common_programs_list[@]}";
|
|
do
|
|
currentProg=${common_programs_list[$i]}
|
|
|
|
if [ $( check_installed $currentProg ) -eq 0 ]
|
|
then
|
|
install_prog $currentProg
|
|
else
|
|
skip_prog $currentProg
|
|
fi
|
|
done
|
|
}
|
|
|
|
install_debian()
|
|
{
|
|
package_manager="sudo apt install -y "
|
|
color_start "themeIndication"
|
|
echo "---------------------------------"
|
|
echo "Istallation will begin for $OS"
|
|
echo "---------------------------------"
|
|
color_stop
|
|
common_install
|
|
install_defaults_debian
|
|
}
|
|
|
|
install_arch()
|
|
{
|
|
package_manager="yes | sudo packman -S "
|
|
color_start "themeIndication"
|
|
echo "---------------------------------"
|
|
echo "Istallation will begin for $OS"
|
|
echo "---------------------------------"
|
|
common_install
|
|
install_defaults_arch
|
|
}
|
|
|
|
install_raspberry()
|
|
{
|
|
package_manager="sudo apt install -y "
|
|
color_start "themeIndication"
|
|
echo "---------------------------------"
|
|
echo "Istallation will begin for $OS"
|
|
echo "---------------------------------"
|
|
common_install
|
|
install_defaults_raspberry
|
|
}
|