From ed6bb0ace17548c480c45708ccf0b39aeaf9e92f Mon Sep 17 00:00:00 2001 From: dtookey Date: Fri, 15 Apr 2022 11:38:23 -0400 Subject: [PATCH] tweaked the import script a little to make the output more clear --- src/bash/import.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/bash/import.sh b/src/bash/import.sh index 144cbbd..775cf2a 100644 --- a/src/bash/import.sh +++ b/src/bash/import.sh @@ -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 \ No newline at end of file +echo "everything ran at $(date)" >${HOME}/confirm.txt