bin/imager.fuse
changeset 44 f1fea4381014
parent 42 b5db10953648
child 51 0b6b92d1eb65
--- a/bin/imager.fuse	Sun Jul 31 23:22:07 2011 +0200
+++ b/bin/imager.fuse	Sun Jul 31 23:22:59 2011 +0200
@@ -22,8 +22,8 @@
 );
 lock_keys %o;
 
-use constant ME => basename $0;
-use constant BS => 4 * 1024;
+use constant ME     => basename $0;
+use constant BS     => 4 * 1024;
 use constant CIPHER => "aes-128-cbc";
 
 my ($DATA, $IDX);
@@ -48,9 +48,9 @@
         "d|debug!" => \$o{debug},
         "detach!"  => \$o{detach},
         "tmp:s" => sub { $o{tmp} = length $_[1] ? $_[1] : $ENV{TMP} // "/tmp" },
-        "h|help" => sub { pod2usage(-verbose => 1, -exit => 0) },
-	"p|pass=s" => \$o{pass},
-        "m|man"  => sub {
+        "h|help"   => sub { pod2usage(-verbose => 1, -exit => 0) },
+        "p|pass=s" => \$o{pass},
+        "m|man"    => sub {
             pod2usage(
                 -verbose   => 2,
                 -exit      => 0,
@@ -230,28 +230,36 @@
                 gunzip($fh => \$cache{data})
                   or die $GunzipError;
             }
-	    elsif (-e "$fn.x") {
-		open(my $fh => "openssl @{[CIPHER]} -d -pass '$o{pass}' -in '$fn.x'|");
-		binmode($fh);
-		local $/ = undef;
-		$cache{data} = <$fh>;
-		close($fh);
-	    }
-	    elsif (-e "$fn.gz.x") {
-		open(my $fh => "openssl @{[CIPHER]} -d -pass '$o{pass}' -in '$fn.gz.x'|");
-		binmode($fh);
-		gunzip($fh => \$cache{data})
-		    or die $GunzipError;
-		close($fh);
-	    }
-	    elsif (-e "$fn.x.gz") {
-		warn "$fn.x.gz is depreciated!\n";
-		open(my $fh => "zcat $fn.x.gz | openssl @{[CIPHER]} -d -pass '$o{pass}'|");
-		binmode($fh);
-		local $/ = undef;
-		$cache{data} = <$fh>;
-		close($fh);
-	    }
+            elsif (-e "$fn.x") {
+                open(
+                    my $fh =>
+                      "openssl @{[CIPHER]} -d -pass '$o{pass}' -in '$fn.x'|");
+                binmode($fh);
+                local $/ = undef;
+                $cache{data} = <$fh>;
+                close($fh);
+            }
+            elsif (-e "$fn.gz.x") {
+                open(
+                    my $fh =>
+                      "openssl @{[CIPHER]} -d -pass '$o{pass}' -in '$fn.gz.x'|"
+                );
+                binmode($fh);
+                gunzip($fh => \$cache{data})
+                  or die $GunzipError;
+                close($fh);
+            }
+            elsif (-e "$fn.x.gz") {
+                warn "$fn.x.gz is depreciated!\n";
+                open(
+                    my $fh =>
+                      "zcat $fn.x.gz | openssl @{[CIPHER]} -d -pass '$o{pass}'|"
+                );
+                binmode($fh);
+                local $/ = undef;
+                $cache{data} = <$fh>;
+                close($fh);
+            }
             $cache{fn} = $fn;
         }