lbrycrd/contrib/mining/yiimp_db/init-db.sh

11 lines
255 B
Bash
Raw Normal View History

2019-07-11 20:10:49 +02:00
#!/bin/bash
for f in /tmp/sql/*; do
case "$f" in
*.sql) echo "$0: running $f"; "${mysql[@]}" --force < "$f"; echo ;;
*.sql.gz) echo "$0: running $f"; gunzip -c "$f" | "${mysql[@]}"; echo ;;
*) echo "$0: ignoring $f" ;;
esac
echo
done