#! /bin/ksh

typeset i=''
typeset org_ODMDIR="${ODMDIR:-/etc/objrepos}"

ODMDIR='.'

for i in sm_cmd_hdr sm_cmd_opt sm_menu_opt sm_name_hdr
do
  if [[ ! -f "${i}" ]]
  then
    ODMDIR='/usr/lib/objrepos' odmshow "${i}" > "${i}.def"
    odmcreate "${i}.def" 
  fi
done

for i in sm_cmd_hdr sm_cmd_opt sm_menu_opt sm_name_hdr
do
  [[ -r "${i}.txt" ]] && odmadd "${i}.txt"
done

for i in sm_cmd_hdr sm_cmd_opt sm_menu_opt sm_name_hdr
do
  odmget "${i}" > "${i}.txt2"
done

smit -o "${ODMDIR}" -l ./script.log -s ./smit.script

exit $?

##################### EOF ##########################
