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 #!/bin/bash
# Parent installer for all System Setup Scripts.
APT_CMD=$(which apt-get) APT_CMD=$(which apt-get)
PACMAN_CMD=$(which pacman) PACMAN_CMD=$(which pacman)
if [[ ! -z $APT_CMD ]]; then if [[ -z $APT_CMD ]]; then
system=Debian
echo "System Identified: Debian" echo "System Identified: Debian"
# Make sure System is Updated elif [[ -z $PACMAN_CMD ]]; then
echo "apt-get update && apt-get upgrade -Y" system=Arch
#apt update && apt upgrade -Y echo "System Identified: Arch"
# 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"
break
elif [[ "$answer" = "n" ]]; then
echo "Proceeding with Debian Stable"
break
else else
echo "Invalid Input. Please enter 'y' or 'n'." echo "System Misconfigured"
break
fi fi
done
# Start System Setup systemsetup="./scripts/"
elif [[ ! -z $PACMAN_CMD ]]; then bash $systemsetup/sources-setup.sh $system
echo "Arch" bash $systemsetup/sudo-setup.sh $system
fi bash $systemsetup/git-setup.sh $system
echo "done"