1/13
This commit is contained in:
@@ -6,8 +6,17 @@ dependencies=("nmap" "python3" "awk" "amap")
|
||||
|
||||
for dependency in "${dependencies[@]}"; do
|
||||
if ! command -v "$dependency" &> /dev/null; then
|
||||
echo -e "\e[1;31mERROR: $dependency is not installed. Please install it before running this script.\e[0m"
|
||||
exit 1
|
||||
echo -e "\e[1;31mERROR: $dependency is not installed.\e[0m"
|
||||
read -p "Do you want to install it now? [y/n] " install_choice
|
||||
if [[ "$install_choice" =~ ^[Yy]$ ]]; then
|
||||
# Install the dependency (replace with appropriate command for your system)
|
||||
sudo apt-get install "$dependency" # Example for Debian/Ubuntu
|
||||
echo -e "\e[1;32m Finished installing dependencies, Starting Script \e[0m"
|
||||
sleep 2.5
|
||||
else
|
||||
echo "Exiting script. Please install the missing dependencies and try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user