Add CLI options for use with unattended builds.

This commit is contained in:
Kaj Forney 2018-09-29 02:35:13 -06:00
parent b8f0c9f178
commit 57b9323b2e

View file

@ -11,6 +11,19 @@ then
exit 1 exit 1
fi fi
#Argument check!
while getopts ud:r: option
do
case "${option}" in
u) UNATTEND=true;;
d) DESKTOP=${OPTARG};;
r) REPO=${OPTARG};;
esac
done
if [ $UNATTEND != "true" ];
then
whiptail --backtitle "Pentest Build Script" --title "Welcome" --msgbox "This script will help you build a custom pentesting distribution." 7 70 whiptail --backtitle "Pentest Build Script" --title "Welcome" --msgbox "This script will help you build a custom pentesting distribution." 7 70
DISTRO=$(lsb_release -i -s) DISTRO=$(lsb_release -i -s)
@ -44,6 +57,7 @@ else
whiptail --backtitle "Pentest Build Script" --title "OK" --msgbox "This script will now terminate." 8 35 whiptail --backtitle "Pentest Build Script" --title "OK" --msgbox "This script will now terminate." 8 35
exit 1 exit 1
fi fi
fi
#This is the stuff that's common to both distros #This is the stuff that's common to both distros
dpkg-name ./debs/*.deb dpkg-name ./debs/*.deb
@ -89,6 +103,9 @@ Parrot)
;; ;;
esac esac
if [ $UNATTEND != "true" ];
then
whiptail --backtitle "Pentest Build Script" --title "Finished" --msgbox "Fingers crossed there were no errors... Your image should be done!" 7 70 whiptail --backtitle "Pentest Build Script" --title "Finished" --msgbox "Fingers crossed there were no errors... Your image should be done!" 7 70
fi
exit 0 exit 0