Cleanup libcrypto.num and make update
[openssl.git] / tools / c_rehash.in
index 6c2ff065d1b54ede33a884458667229d7b9336a1..dc66a9d9625872a2eeb28ad364f2af5546721b84 100644 (file)
@@ -1,11 +1,14 @@
-#!/usr/local/bin/perl
+#!{- $config{perl} -}
+
+# {- join("\n# ", @autowarntext) -}
 
 # Perl c_rehash script, scan all files in a directory
 # and add symbolic links to their hash values.
 
-my $dir;
-my $prefix;
+my $dir = {- quotify1($config{openssldir}) -};
+my $prefix = {- quotify1($config{prefix}) -};
 
+my $errorcount = 0;
 my $openssl = $ENV{OPENSSL} || "openssl";
 my $pwd;
 my $x509hash = "-subject_hash";
@@ -89,9 +92,11 @@ foreach (@dirlist) {
                hash_dir($_);
             } else {
                 print "Skipping $_, can't write\n";
+                $errorcount++;
             }
        }
 }
+exit($errorcount);
 
 sub hash_dir {
        my %hashlist;