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

51 lines
1012 B
Bash

#!/bin/bash
# Aney's Debian Auto Ricer
# Downloads the rest of my scripties, and runs what is wanted
# i.e. Basic install, Server, Desktop nogui, Desktop gui,
INSTALL_TYPE=""
USER="nathan"
# If the user isn't root. Don't run.
if [[ $EUID -ne 0 ]]; then
echo -e "\n### This script must be run as root ###\n"
exit 1
fi
if [ "$1" == "server" ] || [ "$1" == "desktop" ]
then
INSTALL_TYPE=$1
else
INSTALL_TYPE="desktop"
fi
# Download the scripts
apt install git
if [ -d "/home/$USER/adarDir" ]
then
echo "Directory already exists, skipping git clone"
else
echo "Directory doesn't exist"
git clone ssh://git@alphavps.aney.co.uk:2020/srv/git/scripts.git /home/$USER/adarDir
fi
# Enter the directory
cd /home/$USER/adarDir/installs/debian
if [ "$INSTALL_TYPE" == "server" ]
then
bash debian_server.sh $USER
else
bash debian_desktop.sh $USER
echo -e "\nDo you wish to install a GUI?\n1)Yes\nOther)No"
read INPUT
if [ $INPUT -eq 1 ]
then
bash debian_gui.sh
bash debian_unfinished.sh
fi
fi