aboutsummaryrefslogtreecommitdiffstats
path: root/fallback.pl
diff options
context:
space:
mode:
authorkraxel <kraxel>2005-02-09 11:49:57 +0000
committerkraxel <kraxel>2005-02-09 11:49:57 +0000
commit65b4d6491a2fcd32efe5b0cacf137305af95b541 (patch)
tree02902d70eca9938000f4b4f97793fa6c4423be24 /fallback.pl
parent73671a2f4f0e6e03a509ff5a97ab70d7b0db12b1 (diff)
downloadscsi-changer-65b4d6491a2fcd32efe5b0cacf137305af95b541.tar.gz
- add/update files.
Diffstat (limited to 'fallback.pl')
-rwxr-xr-xfallback.pl26
1 files changed, 26 insertions, 0 deletions
diff --git a/fallback.pl b/fallback.pl
new file mode 100755
index 0000000..03706c4
--- /dev/null
+++ b/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;
+}