Browse Source

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: b4d4430792
Former-commit-id: 95f60dc409
testing
Kaj Forney 1 year ago
parent
commit
a4cb9fc977
3 changed files with 17 additions and 4 deletions
  1. 1
    1
      README.md
  2. 4
    0
      logs/.gitignore
  3. 12
    3
      runme.sh

+ 1
- 1
README.md View File

@@ -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
- 0
logs/.gitignore View File

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

+ 12
- 3
runme.sh View File

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

Loading…
Cancel
Save