diff --git a/README.md b/README.md index b330db16..cbd80833 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Clone this repository with `git clone --recursive`, then make whatever changes y * Add any extra software from the repository you wish to install to the config/software.list.chroot file. * Add any commands you want to have run during the build process to the config/pentest-distro-builder.chroot file. -When you're ready to build, run `sudo ./runme.sh` . Once it's complete, the finished image will be copied to the images/ folder. +When you're ready to build, run `sudo ./runme.sh` . Once it's complete, the finished image will be copied to the images/ folder, and a log file will be created in the logs/ folder. If you run the script without any options, it will build whichever OS you are currently running, and prompt for which desktop environment and repository you wish to use. If you wish, however, you can manually specify these options instead (for example, to script an image to be built nightly or weekly): diff --git a/logs/.gitignore b/logs/.gitignore new file mode 100644 index 00000000..5e7d2734 --- /dev/null +++ b/logs/.gitignore @@ -0,0 +1,4 @@ +# Ignore everything in this directory +* +# Except this file +!.gitignore diff --git a/runme.sh b/runme.sh index a1f23337..73b69fb4 100755 --- a/runme.sh +++ b/runme.sh @@ -83,7 +83,8 @@ Kali) cd build/live-build-config ./build.sh --distribution kali-rolling --variant $DESKTOP --verbose - cp images/*.iso ../../images/kali-rolling-$DESKTOP-$(date -I).iso + cp images/*.iso ../../images/kali-rolling-$DESKTOP-$(date -I)-$(date +%H%M).iso + cp build.log ../../logs/kali-rolling-$DESKTOP-$(date -I)-$(date +%H%M).log ;; Parrot) cp -rv ./modules/parrot-build ./build/ @@ -101,13 +102,21 @@ Parrot) cd build/parrot-build ./build.sh build variant-$DESKTOP amd64 - cp ../*.iso ../../images/parrotsec-$DESKTOP-$(date -I).iso + cp ../*.iso ../../images/parrotsec-$DESKTOP-$(date -I)-$(date +%H%M).iso + cp buildlog.log ../../logs/parrotsec-$DESKTOP-$(date -I)-$(date +%H%M).log ;; 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 + if [ -f ../../images/parrotsec-$DESKTOP-$(date -I).iso ]; + then + whiptail --backtitle "Pentest Build Script" --title "Finished" \ + --msgbox "Fingers crossed there were no errors... Your image should be done!" 7 70 + else + whiptail --backtitle "Pentest Build Script" --title "OH NO" \ + --msgbox "Something went wrong and no .iso file was created... Check the log file for details! :-(" 7 92 + fi fi exit 0