This commit is contained in:
Your Name
2025-04-26 09:09:20 +12:00
parent 9e6281c846
commit cf8a7db01d
9 changed files with 178 additions and 157 deletions

View File

@ -9,6 +9,17 @@ GREEN='\033[0;32m'
YELLOW='\033[1;33m'
NC='\033[0m' # No Color
# Parse command line arguments
AUTO_INSTALL=false
for arg in "$@"; do
case $arg in
--auto-install)
AUTO_INSTALL=true
;;
esac
done
# Function to print status messages
print_status() {
echo -e "${GREEN}[*] $1${NC}"
@ -79,10 +90,8 @@ else
fi
# Check if user wants to install
read -p "Do you want to install the program? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
print_status "Installing dropshell..."
if [ $AUTO_INSTALL = true ]; then
print_status "Auto-installing dropshell..."
sudo make install
if [ $? -eq 0 ]; then
print_status "Installation successful!"
@ -90,6 +99,19 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
print_error "Installation failed!"
exit 1
fi
else
read -p "Do you want to install the program? (y/n) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
print_status "Installing dropshell..."
sudo make install
if [ $? -eq 0 ]; then
print_status "Installation successful!"
else
print_error "Installation failed!"
exit 1
fi
fi
fi
# Return to original directory