#!/bin/sh
# mdk.sh -- generate header file from default keys file

# Empty file if it exists and write warning message.
echo "/* Do not edit this file; it is automatically generated. */" > def-keys.h

echo "const char *const def_keys[] = {" >> def-keys.h
cat "${1}/def-keys" | sed -e 's/^/"/' -e 's/$/\\n",/' -e "/#/d" >> def-keys.h
echo "};" >> def-keys.h
