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
|
#!/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"
|
||||||
|
|
Loading…
Reference in a new issue