From cae438497f2f1c8c5f44fd01ea6755fffab4fe91 Mon Sep 17 00:00:00 2001 From: Kaj Forney Date: Sat, 29 Sep 2018 02:35:13 -0600 Subject: [PATCH] Add CLI options for use with unattended builds. Former-commit-id: 5e29956dcf271d995ebe2e1cae5ecba902c9daff Former-commit-id: ac82de30f8840b34434ec54534e588700e33c21e --- runme.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/runme.sh b/runme.sh index c1b95ab7..fe96719b 100755 --- a/runme.sh +++ b/runme.sh @@ -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