Quality of life update.

Actually error out if no .iso is created, keep build logs in a logs folder, and add a timestamp to the finished files.


Former-commit-id: b4d4430792851f1b591fae451af1139aa83af26c
Former-commit-id: 95f60dc40903d3cccfb755f8cc25f8e5fc629db1
This commit is contained in:
Kaj Forney 2019-01-25 00:19:04 -07:00
부모 75033569c9
커밋 a4cb9fc977
3개의 변경된 파일17개의 추가작업 그리고 4개의 파일을 삭제

파일 보기

@ -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):

4
logs/.gitignore vendored Normal file
파일 보기

@ -0,0 +1,4 @@
# Ignore everything in this directory
*
# Except this file
!.gitignore

파일 보기

@ -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