documentation/Reference Code/Wedge/is4c/lane_db-install
#!/bin/sh
#--ATF prompt for mysql binaries path and user/pwd to connect
echo -n "Path to MySQL binaries [default /usr/local/mysql/bin]: "
read MYPATH
if [ "${MYPATH}" = "" ]; then
MYPATH=/usr/local/mysql/bin
fi
echo -n "MySQL user account [default root]: "
read MYUSR
if [ "${MYUSR}" = "" ]; then
MYUSR=root
fi
echo -n "MySQL password for ${MYUSR}@localhost [default (none)]: "
STTY_ECHO=`stty -g`
stty -echo
read MYPWD
stty ${STTY_ECHO}
CMD="${MYPATH}/mysql --user=${MYUSR} --password=${MYPWD}"
#--atf
cd /pos/installation/mysql/script
${CMD} < create_lane_db
cd ../translog/tables
${CMD} < activities.table
${CMD} < activitylog.table
${CMD} < activitytemplog.table
${CMD} < alog.table
${CMD} < dtransactions.table
${CMD} < localtemptrans.table
${CMD} < localtrans.table
${CMD} < localtransarchive.table
${CMD} < suspended.table
cd ../views
${CMD} < localtranstoday.viw
${CMD} < suspendedtoday.viw
${CMD} < suspendedlist.viw
${CMD} < lttsummary.viw
${CMD} < lttsubtotals.viw
${CMD} < subtotals.viw
${CMD} < ltt_receipt.viw
${CMD} < receipt.viw
${CMD} < rp_ltt_receipt.viw
${CMD} < rp_receipt_header.viw
${CMD} < rp_receipt.viw
${CMD} < rp_list.viw
${CMD} < screendisplay.viw
${CMD} < memdiscountadd.viw
${CMD} < memdiscountremove.viw
${CMD} < staffdiscountadd.viw
${CMD} < staffdiscountremove.viw
${CMD} < memchargetotals.viw
cd ../../opdata/tables
${CMD} < chargecode.table
${CMD} < couponcodes.table
${CMD} < custdata.table
${CMD} < departments.table
${CMD} < employees.table
${CMD} < globalvalues.table
${CMD} < products.table
${CMD} < promomsgs.table
${CMD} < tenders.table
cd ../data
${CMD} < couponcodes.insert
${CMD} < custdata.insert
${CMD} < departments.insert
${CMD} < employees.insert
${CMD} < globalvalues.insert
${CMD} < products.insert
${CMD} < tenders.insert
cd ../views
${CMD} < chargecodeview.viw
${CMD} < memchargebalance.viw
cd ../../is4c_op/tables
${CMD} < couponcodes.table
${CMD} < custdata.table
${CMD} < chargecode.table
${CMD} < departments.table
${CMD} < employees.table
${CMD} < products.table
${CMD} < tenders.table
cd ../../script
${CMD} < create_acct