core-legacy/compile_migrations.sh

14 lines
268 B
Bash
Raw Normal View History

#!/usr/bin/env bash
cd "$(dirname "$0")";
migration_num=0;
while [ -f sql/migration_$migration_num.sql ]
do
2020-05-05 09:42:02 +00:00
xxd -i sql/migration_$migration_num.sql | sed 's/\([0-9a-f]\)$/\0, 0x00/' > include/migrations/$migration_num.sql.h
((migration_num++));
done;
cd $PWD;