Compare commits

...

2 commits

Author SHA1 Message Date
Rodolfo 863f6df3f8 Add start up script 2024-07-01 01:54:26 +08:00
Rodolfo 537938886d Fix typos 2024-07-01 01:53:45 +08:00
3 changed files with 50 additions and 3 deletions

View file

@ -24,7 +24,7 @@ while true; do
fi fi
echo "git clone $repo $home_PATH/Repos/dotfiles" echo "git clone $repo $home_PATH/Repos/dotfiles"
if [[ $? == 0 ]]; then if [[ $? == 0 ]]; then
for file in $home_PATH/Repos/*; do for file in $home_PATH/Repos/dotfiles/*; do
echo "ln -s $file $home_PATH/.config/" echo "ln -s $file $home_PATH/.config/"
done done
break break
@ -61,7 +61,7 @@ echo ""
echo "sudo pacman -S --noconfirm --needed base-devel" echo "sudo pacman -S --noconfirm --needed base-devel"
while IFS= read -r line ; do while IFS= read -r line ; do
echo "sudo pacman -S --noconfirm --needed $line" echo "sudo pacman -S --noconfirm --needed $line"
done < $script_PATH/arch-assets/archpkg.txt done < $scripts_PATH/arch-assets/archpkg.txt
echo -e "\n\n\n\n" echo -e "\n\n\n\n"
echo "" echo ""
@ -83,6 +83,7 @@ read -p "Would you like to set an alternate SSH port? (Empty to skip) " sshPort
if [[ ! -z $sshPort && $sshPort =~ ^[0-9]+$ ]]; then if [[ ! -z $sshPort && $sshPort =~ ^[0-9]+$ ]]; then
echo "sudo ufw allow $sshPort" echo "sudo ufw allow $sshPort"
fi fi
echo "systemctl enable ufw"
# Setup Printer # Setup Printer
echo "systemctl enable cups" echo "systemctl enable cups"

View file

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
while IFS= read -r line ; do while IFS= read -r line ; do
echo "sudo pacman -S --needed $line" echo "sudo pacman -S --noconfirm --needed $line"
done < $1 done < $1
# Get Blender # Get Blender

46
start-setup.sh Executable file
View file

@ -0,0 +1,46 @@
#!/bin/bash
if [[ $(whoami) == "root" ]]; then
echo "Do not run as root!"
exit 2
fi
echo ""
echo "==============="
echo " Intro "
echo "==============="
echo ""
script_PATH=$(pwd)
if [[ -d /etc/apt ]]; then
while true; do
read -p "Are you using a Debian? (y/n)" answer
if [[ "${answer,,}" == "y" ]]; then
echo "bash script_PATH/debiansetup.sh"
break
elif [[ "${answer,,}" == "n" ]]; then
echo "Use a compatible system (Debian/Arch)"
break
else
echo "Invalid input 'y/n'"
fi
done
elif [[ -d /etc/pacman ]]; then
while true; do
read -p "Are you using a Arch? (y/n)" answer
echo "${answer,,}"
if [[ "${answer,,}" == "y" ]]; then
echo "bash script_PATH/archsetup.sh"
break
elif [[ "${answer,,}" == "n" ]]; then
echo "Use a compatible system (Debian/Arch)"
break
else
echo "Invalid input 'y/n'"
fi
done
else
echo "Error: Could not identify system."
exit 2
fi