Fix error check.

Former-commit-id: 4368f281c6fa56a69ce1c460f8556a2242fec2a6
Former-commit-id: e71be705e60356894c900d8dd48ae9f5fb53f259
This commit is contained in:
Kaj Forney 2019-01-25 02:32:47 -07:00
parent a4cb9fc977
commit a2db22a75d

View file

@ -69,6 +69,7 @@ apt install git build-essential cdebootstrap live-build curl wget -y
case $DISTRO in
Kali)
IMAGENAME=kali-rolling-$DESKTOP-$(date -I)-$(date +%H%M)
cp -rv ./modules/live-build-config ./build/
mkdir ./build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot
cp ./debs/*.deb build/live-build-config/kali-config/variant-$DESKTOP/packages.chroot/
@ -83,10 +84,11 @@ Kali)
cd build/live-build-config
./build.sh --distribution kali-rolling --variant $DESKTOP --verbose
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
cp images/*.iso ../../images/$IMAGENAME.iso
cp build.log ../../logs/$IMAGENAME.log
;;
Parrot)
IMAGENAME=parrotsec-$DESKTOP-$(date -I)-$(date +%H%M)
cp -rv ./modules/parrot-build ./build/
mkdir ./build/parrot-build/templates/parrot-variant-$DESKTOP/packages.chroot
cp ./debs/*.deb build/parrot-build/templates/parrot-variant-$DESKTOP/packages.chroot/
@ -102,14 +104,14 @@ Parrot)
cd build/parrot-build
./build.sh build variant-$DESKTOP amd64
cp ../*.iso ../../images/parrotsec-$DESKTOP-$(date -I)-$(date +%H%M).iso
cp buildlog.log ../../logs/parrotsec-$DESKTOP-$(date -I)-$(date +%H%M).log
cp ../*.iso ../../images/$IMAGENAME.iso
cp logfile.log ../../logs/$IMAGENAME.log
;;
esac
if [[ $UNATTEND != "true" ]];
then
if [ -f ../../images/parrotsec-$DESKTOP-$(date -I).iso ];
if [ -f ../../images/$IMAGENAME.iso ];
then
whiptail --backtitle "Pentest Build Script" --title "Finished" \
--msgbox "Fingers crossed there were no errors... Your image should be done!" 7 70