#!/bin/sh
#
# Optionals package for VL BASE

. ./config.vl

pause() {
  if [ "$AUTO_PAUSE" = "yes" ]; then
     echo
     echoc "$*" yellow
     echo Press [Enter]
     read pause  
  fi
}
STARTED=`date`

cat <<EOF
AUTO BUILD $DISTRO_NAME-$DISTRO_VERSION"

This build use the following partitions:
  CDROM  = $CDROM_DEV
  TARGET = $TARGET_DEV
  MEDIA  = $MEDIA_DEV
  SETUP  = $SETUP_DEV

Press enter to continue, Ctrl-Break to Cancel
EOF
read pause

pause "Step 1. Clean the TARGET and MEDIA"
./v1-clean || exit 1

pause "Step 2. Install base system to the TARGET"
./v2-base || exit 1

pause "Step 3. Copy kernel to the TARGET"
./v3-kernel || exit 1

pause "Step 4. Compile and install core packages to the TARGET"
./v4-core1 || exit 1

pause "Step 5. Compile and copy packages to the MEDIA"
./v5-pack1 || exit 1

pause "Step 6. Compress bulks (including TARGET) to the MEDIA"
./v6-bulk1 || exit 1

pause "Step 7. Make the ISO IMAGE from the MEDIA"
./v7-iso || exit 1

FINISHED=`date`

cat<<EOF
Started = $STARTED
Finish  = $FINISHED

HORAY .... finish !!!
Your next options:
- run v8-setup to make SETUP partition and test it
- run v81-install to test it directly (not so recomended)
- take the ISO and burn it

EOF
