You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
1.4 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
${pckgmngr_list[$OS_NO]} $1
echo "${pckgmngr_list[$OS_NO]} $1"
}
# arg($1) = Program's name
skip_prog()
{
color_start "themeSkip"
echo "--> $1"
echo " |--> Was found and will not be installed"
echo ""
echo "${pckgmngr_list[$OS_NO]} $1"
color_stop
}
install_from_list()
{
theList=("$@")
for i in "${!theList[@]}";
do
currentProg=${theList[$i]}
if [ $( check_installed $currentProg ) -eq 0 ]
then
install_prog $currentProg
else
skip_prog $currentProg
fi
done
}
install_start()
{
graphics_indication "Common installations these programs are OS independent from"
sleep $sleepTime
install_from_list "${common_programs_list[@]}"
graphics_indication "Istallation will begin for $OS"
sleep $sleepTime
case $OS in
debian)
install_from_list "${default_installs_debian[@]}"
install_from_list "${custom_installs_debian[@]}"
;;
arch)
;;
install_from_list "${default_installs_arch[@]}"
install_from_list "${custom_installs_arch[@]}"
rasberry)
;;
install_from_list "${default_installs_raspberry[@]}"
install_from_list "${custom_installs_raspberry[@]}"
*)
echo "Invalid os for installation"
exit_abord
;;
esac
}