add more spacing
[personal-kdebase.git] / runtime / kioslave / fish / generate_fishcode.sh
blobab1ba087a851d29da9f3c538018da7fdf0e4ee4c
1 #!/bin/sh
3 # $1 is fish.pl
4 # $2 is md5sum
5 # $3 is the output file
6 # $4 are the parameters for cut
8 SUM=`$2 "$1" | cut -d ' ' $4 `
9 echo '#define CHECKSUM "'$SUM'"' > $3
10 echo 'static const char *fishCode(' >> $3
11 sed -e 's/\\/\\\\/g;s/"/\\"/g;s/^[ ]*/"/;/^"# /d;s/[ ]*$/\\n"/;/^"\\n"$/d;s/{CHECKSUM}/'$SUM'/;' "$1" >> $3
12 echo ');' >> $3