parent
a35313c760
commit
aaf6c85caa
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
|
||||
MAIN_DIR=$PWD
|
||||
|
||||
source $MAIN_DIR/programs/os/debian_install.sh
|
||||
source $MAIN_DIR/programs/os/arch_install.sh
|
||||
source $MAIN_DIR/programs/os/raspberry_install.sh
|
||||
|
||||
|
||||
os_list=(debian arch raspberry)
|
||||
|
||||
common_programs_list=(\
|
||||
htop \
|
||||
tmux \
|
||||
git \
|
||||
fish \
|
||||
mc \
|
||||
wget \
|
||||
sudo \
|
||||
unzip \
|
||||
cmake \
|
||||
make \
|
||||
gcc \
|
||||
exa)
|
||||
|
||||
default_installs_debian=(qutebrowser)
|
||||
default_installs_arch=(qutebrowser)
|
||||
default_installs_raspberry=(chromium)
|
||||
|
||||
os_list_count=${#os_list[@]}
|
||||
|
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_defaults_arch()
|
||||
{
|
||||
color_start "themeIndication"
|
||||
echo "------------------------------"
|
||||
echo "Default installations for Arch"
|
||||
echo "------------------------------"
|
||||
color_stop
|
||||
sleep 1
|
||||
for i in "${!default_installs_arch[@]}";
|
||||
do
|
||||
currentProg=${default_installs_arch[$i]}
|
||||
|
||||
if [ $( check_installed $currentProg ) -eq 0 ]
|
||||
then
|
||||
install_prog $currentProg
|
||||
else
|
||||
skip_prog $currentProg
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_defaults_debian()
|
||||
{
|
||||
color_start "themeIndication"
|
||||
echo "--------------------------------"
|
||||
echo "Default installations for Debian"
|
||||
echo "--------------------------------"
|
||||
color_stop
|
||||
sleep 1
|
||||
for i in "${!default_installs_debian[@]}";
|
||||
do
|
||||
currentProg=${default_installs_debian[$i]}
|
||||
|
||||
if [ $( check_installed $currentProg ) -eq 0 ]
|
||||
then
|
||||
install_prog $currentProg
|
||||
else
|
||||
skip_prog $currentProg
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -0,0 +1,82 @@
|
||||
#!/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
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
install_defaults_raspberry()
|
||||
{
|
||||
color_start "themeIndication"
|
||||
echo "-----------------------------------"
|
||||
echo "Default installations for Raspberry"
|
||||
echo "-----------------------------------"
|
||||
color_stop
|
||||
sleep 1
|
||||
for i in "${!default_installs_raspberry[@]}";
|
||||
do
|
||||
currentProg=${default_installs_raspberry[$i]}
|
||||
|
||||
if [ $( check_installed $currentProg ) -eq 0 ]
|
||||
then
|
||||
install_prog $currentProg
|
||||
else
|
||||
skip_prog $currentProg
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
@ -0,0 +1,86 @@
|
||||
#!/bin/bash
|
||||
|
||||
SETUP_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
source $SETUP_SCRIPT_DIR/config.sh
|
||||
source $SETUP_SCRIPT_DIR/programs/os/os_install.sh
|
||||
|
||||
source $SETUP_SCRIPT_DIR/../scripts/colors.sh
|
||||
source $SETUP_SCRIPT_DIR/../scripts/check_installed.sh
|
||||
|
||||
exit_abord()
|
||||
{
|
||||
color_start "themeError"
|
||||
echo "#############################################"
|
||||
echo "# Linux instalation Script Has been aborded #"
|
||||
echo "#############################################"
|
||||
color_stop
|
||||
}
|
||||
|
||||
exit_sucsess()
|
||||
{
|
||||
color_start "themeSuccess"
|
||||
echo "###################################################"
|
||||
echo "# Linux instalation Script Has ended with Sucsess #"
|
||||
echo "###################################################"
|
||||
color_stop
|
||||
}
|
||||
|
||||
color_start "themeGreetings"
|
||||
echo "###########################################"
|
||||
echo "# Wellcome to my Linux instalation Script #"
|
||||
echo "###########################################"
|
||||
color_stop
|
||||
echo ""
|
||||
|
||||
|
||||
color_start "themeIndication"
|
||||
echo "-------------------------------------------"
|
||||
echo "The Following programms will be installed :"
|
||||
echo "-------------------------------------------"
|
||||
color_stop
|
||||
|
||||
color_start "themeFocus"
|
||||
for i in "${!common_programs_list[@]}";
|
||||
do
|
||||
printf "${common_programs_list[$i]} | "
|
||||
done
|
||||
color_stop
|
||||
echo ""
|
||||
echo ""
|
||||
|
||||
color_start "themeInput"
|
||||
echo "---------------------"
|
||||
echo "Please Select your OS"
|
||||
echo "---------------------"
|
||||
color_stop
|
||||
|
||||
color_start "themeSelect"
|
||||
for i in "${!os_list[@]}";
|
||||
do
|
||||
echo "[$(($i + 1))] ${os_list[$i]}"
|
||||
done
|
||||
color_stop
|
||||
|
||||
color_start "themeInput"
|
||||
echo "---------------------"
|
||||
color_stop
|
||||
echo ""
|
||||
|
||||
color_start "themeUserInput"
|
||||
read -p "Select your os or ( q to quit ) : " answer
|
||||
color_stop
|
||||
echo ""
|
||||
|
||||
if [[ "$answer" == "q" ]]; then
|
||||
exit_abord
|
||||
else
|
||||
if [ $answer -lt $(($os_list_count + 1)) ]; then
|
||||
answer=$(( $answer - 1 ))
|
||||
OS=${os_list[$answer]}
|
||||
install_"$OS"
|
||||
else
|
||||
echo " the given nurber was not correct >>ABORDING<<"
|
||||
exit_abord
|
||||
fi
|
||||
fi
|
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
INSTALL_SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
|
||||
source $INSTALL_SCRIPT_DIR/config.sh
|
||||
source $INSTALL_SCRIPT_DIR/scripts/colors.sh
|
||||
source $INSTALL_SCRIPT_DIR/programs/os_install.sh
|
||||
source $INSTALL_SCRIPT_DIR/scripts/check_installed.sh
|
||||
|
||||
|
||||
if [ $( check_installed hellim ) -eq 1 ]
|
||||
then
|
||||
echo Is installed
|
||||
else
|
||||
echo Is not installed
|
||||
fi
|
Loading…
Reference in new issue