#!/bin/bash
# Apply CSS style to 'ncdialogapi.html'
# 
# Author: Mahlon R. Smith - The Software Samurai
# Date  : 27-May-2024

if [ -e ncdialogapi.html ]; then

   if [ -e applycss_response.txt ]; then

      # No argument: full auto processing
      if [ -z $1 ]; then
         idpp -cV ncdialogapi.html
      # 'i' = Interactive, read the responses from file
      elif [ $1 = 'i' ]; then
         idpp -ciV --response=applycss_response.txt ncdialogapi.html
      else
         echo "Unrecognized option:"
         echo " 1) no option == auto processing."
         echo " 2)   'i'     == interactive - reference response file"
      fi
   else
      echo 'applycss_response.txt not found'
   fi

else
   echo 'ncdialogapi.html not found'
fi