Set up script structure

This commit is contained in:
Rodolfo 2024-06-27 13:08:47 +08:00
parent 503564dfa4
commit de714d18e6
5 changed files with 56 additions and 27 deletions

View file

@ -0,0 +1,3 @@
fzf
7zip
batcat

View file

@ -0,0 +1,3 @@
#!/bin/bash
echo "git-setup"

View file

@ -0,0 +1,29 @@
#!/bin/bash
APT_CMD=$(which apt-get)
PACMAN_CMD=$(which pacman)
if [[ ! -z $APT_CMD ]]; then
echo "System Identified: Debian"
echo "apt-get update && apt-get -y upgrade"
while true;do
read -rp "Would you like to use Debian Unstable? (y/n): " answer
answer="${answer,,}"
if [[ "$answer" = "y" ]]; then
echo "Change apt sources"
echo "cp -v ./debian-assets/debian-sid-sources.list /etc/sources.list"
echo "apt-get update && apt-get -y dist-upgrade"
break
elif [[ "$answer" = "n" ]]; then
echo "Proceeding with Debian Stable"
break
else
echo "Invalid Input. Please enter 'y' or 'n'."
fi
done
elif [[ ! -z $PACMAN_CMD ]]; then
echo "Arch"
fi

View file

@ -0,0 +1,3 @@
#!/bin/bash
echo "sudo setup"

View file

@ -1,34 +1,25 @@
#!/bin/bash
# Parent installer for all System Setup Scripts.
APT_CMD=$(which apt-get)
PACMAN_CMD=$(which pacman)
if [[ ! -z $APT_CMD ]]; then
if [[ -z $APT_CMD ]]; then
system=Debian
echo "System Identified: Debian"
# Make sure System is Updated
echo "apt-get update && apt-get upgrade -Y"
#apt update && apt upgrade -Y
# Setup apt sources
while true;do
read -rp "Would you like to use Debian Unstable? (y/n): " answer
answer="${answer,,}"
if [[ "$answer" = "y" ]]; then
echo "Change apt sources"
echo "cp -v ./debian-assets/debian-sid-sources.list /etc/sources.list"
echo "apt-get update && apt-get upgrade -Y"
elif [[ -z $PACMAN_CMD ]]; then
system=Arch
echo "System Identified: Arch"
else
echo "System Misconfigured"
break
elif [[ "$answer" = "n" ]]; then
echo "Proceeding with Debian Stable"
break
else
echo "Invalid Input. Please enter 'y' or 'n'."
fi
done
# Start System Setup
elif [[ ! -z $PACMAN_CMD ]]; then
echo "Arch"
fi
systemsetup="./scripts/"
bash $systemsetup/sources-setup.sh $system
bash $systemsetup/sudo-setup.sh $system
bash $systemsetup/git-setup.sh $system
echo "done"