#!/bin/csh -f # dbload # ----------------------------------------------------------------------------- # C shell script to load data into the InfraTrac MySQL DB. # # Notes: # - Loads a new data set from the specified file, assumed to have been # created by dbsave. # - Such a file typically deletes all existing ingredients, products, # formulations, mappings, users, units, dictionary entries, etc, and # then loads the new ones. # - Edit the specified file first, if you want to avoid deleting and/or # reloading any of the tables. # - Can also be used to load any other MySQL script, including those that # load DDL to create tables, triggers etc. # ----------------------------------------------------------------------------- # Revision History: # $Log$ # ----------------------------------------------------------------------------- if ($1 == "-?" || $1 == "-h" || $1 == "help") then set verb = $0 echo "Usage: $verb:t" echo " $verb:t input_file.sql" exit 1 endif mysqldb < $1 echo "Don't forget to also load the external image and spectra files."