chuyiwen_gmsv/genver.sh

9 lines
260 B
Bash
Raw Permalink Normal View History

2016-12-24 08:45:52 +08:00
#!/bin/sh
IN=./include/version.h
OUT=./genver.h
touch main.c
echo "char *genver=\"" > $OUT
cat $IN | grep -e "^#define" | cut -b 9- | sed "s/\"/\'/g" | \
sed 's/\\/\\\\/g' >> $OUT
echo "<<Generated at "`date`">>" >> $OUT
echo "by : <20><>zoro<72><6F><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n\";" >> $OUT