Set up script structure
This commit is contained in:
parent
503564dfa4
commit
de714d18e6
3
debian-assets/debian-bash-pkgs.txt
Normal file
3
debian-assets/debian-bash-pkgs.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
fzf
|
||||
7zip
|
||||
batcat
|
3
scripts/system-setup/git-setup.sh
Executable file
3
scripts/system-setup/git-setup.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "git-setup"
|
29
scripts/system-setup/sources-setup.sh
Executable file
29
scripts/system-setup/sources-setup.sh
Executable 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
|
3
scripts/system-setup/sudo-setup.sh
Executable file
3
scripts/system-setup/sudo-setup.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "sudo setup"
|
|
@ -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"
|
||||
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"
|
||||
elif [[ -z $PACMAN_CMD ]]; then
|
||||
system=Arch
|
||||
echo "System Identified: Arch"
|
||||
else
|
||||
echo "System Misconfigured"
|
||||
break
|
||||
fi
|
||||
|
||||
systemsetup="./scripts/"
|
||||
|
||||
bash $systemsetup/sources-setup.sh $system
|
||||
bash $systemsetup/sudo-setup.sh $system
|
||||
bash $systemsetup/git-setup.sh $system
|
||||
|
||||
echo "done"
|
||||
|
|
Loading…
Reference in a new issue