core-legacy/compile_migrations.sh

14 lines
259 B
Bash
Raw Normal View History

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