summaryrefslogtreecommitdiff
path: root/tools/command-lines-input.sh
blob: 3e0dafb44e070b67e88111722e4722e672a5e35e (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash

cat command-lines.in | grep -v '^#' | grep -v '\-\-\-' | grep -v '^$' > command-lines.tmp
echo "" >> command-lines.tmp
echo "const char _command_input[] =" > command-lines-input.h
while read -r line; do
	echo "" >> command-lines-input.h
	printf '\"%s\\n\"' "$line" >> command-lines-input.h
done < command-lines.tmp
echo ";" >> command-lines-input.h