diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-27 19:33:03 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-04-27 19:33:03 +0200 |
commit | b739de430878e48eb6b56cadbe59fc65bbf57d51 (patch) | |
tree | 3e7909bb8656970cd8bd62e870eb78c41cf358a7 /scripts | |
parent | b905fa921087b8ea2de8fdc2f7819cd3289d9e72 (diff) | |
download | fbida-b739de430878e48eb6b56cadbe59fc65bbf57d51.tar.gz |
move fallback.pl to scripts
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/fallback.pl | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/fallback.pl b/scripts/fallback.pl new file mode 100755 index 0000000..03706c4 --- /dev/null +++ b/scripts/fallback.pl @@ -0,0 +1,26 @@ +#!/usr/bin/perl -w +# +# build header file from +# +use strict; + +while (my $line = <>) { + chomp $line; + + # ignore comments + next if $line =~ /^!/; +# next if $line =~ /^\s*$/; + + # quote stuff + $line =~ s/\\/\\\\/g; + $line =~ s/\"/\\\"/g; + + # continued line? + if ($line =~ s/\\\\$//) { + printf "\"%s\"\n",$line; + next; + } + + # write out + printf "\"%s\",\n",$line; +} |