From 4565850a7174ec5ed6f42f694aa9ec71c614f6d8 Mon Sep 17 00:00:00 2001 From: Nathan Steel Date: Thu, 29 Jul 2021 19:56:11 +0100 Subject: [PATCH] Add the "main" script, that will run other scripts --- installs/debian/README.md | 12 +++++++++ installs/debian/adar.sh | 51 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 installs/debian/README.md create mode 100755 installs/debian/adar.sh diff --git a/installs/debian/README.md b/installs/debian/README.md new file mode 100644 index 0000000..511e59d --- /dev/null +++ b/installs/debian/README.md @@ -0,0 +1,12 @@ +# ADAR + +Aney's Debian Auto Ricer + +## Why + +Because I forget what I like to install, and maybe I can get some friends, etc. to use debian this way. + +## Todo + +- Make it so it's not specifically tailored for me. +- Maybe create it's own git repo (make sense for a multi-person script) diff --git a/installs/debian/adar.sh b/installs/debian/adar.sh new file mode 100755 index 0000000..b756ffb --- /dev/null +++ b/installs/debian/adar.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +# Aney's Debian Auto Ricer +# Downloads the rest of my scripties, and runs what is wanted +# Currently needs to be hosted on a server (done so that I can test) +# i.e. Basic install, Server, Desktop nogui, Desktop gui, + +SERVER="192.168.1.112/debian" +INSTALL_TYPE="" + +# If the user isn't root. Don't run. +if [[ $EUID -ne 0 ]]; then + echo "This script must be run as root" + exit 1 +fi + +if [ $1 == "server"] || [ $1 == "desktop" ] +then + $INSTALL_TYPE = $1 +else + $INSTALL_TYPE = "desktop" +fi + +# Download the scripts +# TODO: Install scripts from git +#apt install git +#git clone https://github.com/aney/scripts/ +# Delete the git repo that was created + +mkdir adar_scripts + +wget -O adar_scripts/debian_base.sh $SERVER/debian_base.sh +if [ $INSTALL_TYPE == "server" ] +then + wget -O adar_scripts/debian_server.sh $SERVER/debian_server.sh +else + wget -O adar_scripts/debian_desktop.sh $SERVER/debian_desktop.sh + wget -O adar_scripts/debian_gui.sh $SERVER/debian_gui.sh + wget -O adar_scripts/debian_unfinished.sh $SERVER/debian_unfinished.sh +fi + +bash adar_scripts/debian_base.sh +if [ $INSTALL_TYPE == "server" ] +then + bash adar_scripts/debian_server.sh +else + bash adar_scripts/debian_desktop.sh + bash adar_scripts/debian_gui.sh + bash adar_scripts/debian_unfinished.sh +fi +