47 lines
1.1 KiB
Bash
47 lines
1.1 KiB
Bash
|
#!/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
|