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.
43 lines
804 B
Bash
43 lines
804 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=""
|
|
|
|
# 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 "~/adarDir" ]
|
|
then
|
|
echo "Directory already exists, skipping git clone"
|
|
else
|
|
echo "Directory doesn't exists"
|
|
git clone ssh://git@alphavps.aney.co.uk:2020/srv/git/scripts.git ~/adarDir
|
|
fi
|
|
|
|
# Enter the directory
|
|
cd ~/adarDir/installs/debian
|
|
|
|
if [ "$INSTALL_TYPE" == "server" ]
|
|
then
|
|
bash debian_server.sh
|
|
else
|
|
bash debian_desktop.sh
|
|
fi
|
|
|