busted
This commit is contained in:
30
build.sh
30
build.sh
@ -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
|
||||
|
Reference in New Issue
Block a user