31 lines
638 B
Bash
31 lines
638 B
Bash
|
|
#!/bin/bash
|
||
|
|
|
||
|
|
# Detect the distribution and run the appropriate package installation script either for pacman or apt
|
||
|
|
|
||
|
|
if [ -f /etc/os-release ]; then
|
||
|
|
. /etc/os-release
|
||
|
|
DISTRO=$ID
|
||
|
|
else
|
||
|
|
echo "Cannot detect the distribution."
|
||
|
|
exit 1
|
||
|
|
fi
|
||
|
|
|
||
|
|
case "$DISTRO" in
|
||
|
|
arch|manjaro)
|
||
|
|
echo "Detected Arch-based distribution. Running pacman setup..."
|
||
|
|
bash dist/pacman.sh
|
||
|
|
;;
|
||
|
|
ubuntu|debian)
|
||
|
|
echo "Detected Debian-based distribution. Running apt setup..."
|
||
|
|
bash dist/apt.sh
|
||
|
|
;;
|
||
|
|
*)
|
||
|
|
echo "Unsupported distribution: $DISTRO"
|
||
|
|
exit 1
|
||
|
|
;;
|
||
|
|
esac
|
||
|
|
|
||
|
|
echo "Setup completed."
|
||
|
|
|
||
|
|
|