Add CLI options for use with unattended builds.

Former-commit-id: 5e29956dcf271d995ebe2e1cae5ecba902c9daff
Former-commit-id: ac82de30f8840b34434ec54534e588700e33c21e
This commit is contained in:
Kaj Forney 2018-09-29 02:35:13 -06:00
parent 31ef85de73
commit cae438497f

View file

@ -11,6 +11,19 @@ then
exit 1
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
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
exit 1
fi
fi
#This is the stuff that's common to both distros
dpkg-name ./debs/*.deb
@ -89,6 +103,9 @@ Parrot)
;;
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
fi
exit 0