feat: add apply shell

This commit is contained in:
Eshan Roy (Eshanized)
2024-04-30 22:56:00 +05:30
parent 6703d28cf7
commit eab7177c9d

View File

@@ -0,0 +1,22 @@
if [ -e "$1" ]; then
echo ""
echo "Preparing setup.."
echo ""
sudo bash - <$1
fi
echo ""
echo "Installing packages.."
echo ""
installable_packages=$(comm -12 <(pacman -Slq | sort) <(sed s/\\s/\\n/g - <$2 | sort))
sudo pacman -S --needed $installable_packages && rm $2 || { read -p "Error! Press enter to return to setup assistant."; exit; }
if [ -e "$3" ]; then
echo ""
echo "Enabling services.."
echo ""
sudo bash - <$3
fi
echo ""
read -p "Press enter to return to setup assistant."