tweaked the import script a little to make the output more clear

master
dtookey 4 years ago
parent eb456449d2
commit ed6bb0ace1

@ -5,20 +5,17 @@ SQL_DIR=${HOME}/clarity-vitals
USER=clarity
SECRET=$(sed -n 1p "${HOME}"/c)
cd ${HOME}/clarity-vitals/ || exit
for filename in "${SQL_DIR}"/src/sql/0-run-first/*.sql; do
echo "Importing ${filename}"
time( mysql -u"${USER}" -p"${SECRET}" projects < "${filename}" )
echo "======================BEGIN=============================="
echo "Importing ${filename}"
time (mysql -u"${USER}" -p"${SECRET}" projects <"${filename}")
echo "=======================END==============================="
done
#this concats all the script files together with a new line character in between each one
#awk 'FNR==1{print ""}1' ${SQL_DIR}/src/sql/0-run-first/*.sql | mysql -u"${USER}" -p"${SECRET}" projects
#just for dev. we'll use this as the proverbial scarf left on the flower pot
echo "everything ran at $(date)" > ${HOME}/confirm.txt
echo "everything ran at $(date)" >${HOME}/confirm.txt

Loading…
Cancel
Save