You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
239 B

#!/bin/bash
INPUT=${1:-input}
echo "#include <input.h>"
echo ""
printf "const char INPUT[] = "
while IFS= read -r line; do
echo " \"$line\""
done < $INPUT
unset line
echo ";"
echo "const size_t INPUT_SIZE=sizeof(INPUT)/sizeof(char);"