2 # Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
4 # Licensed under the OpenSSL license (the "License"). You may not use
5 # this file except in compliance with the License. You can obtain a copy
6 # in the file LICENSE in the source distribution or at
7 # https://www.openssl.org/source/license.html
9 # modify the '#!/usr/local/bin/perl'
10 # line in all scripts that rely on perl.
14 $#ARGV == 0 || print STDERR "usage: perlpath newpath (eg /usr/bin)\n";
19 return unless /\.pl$/ || /^[Cc]onfigur/;
21 open(IN,"<$_") || die "unable to open $dir/$_:$!\n";
26 $a[0]="#!$ARGV[0]/perl\n";
34 open(OUT,">$new") || die "unable to open $dir/$new:$!\n";
38 rename($new,$_) || die "unable to rename $dir/$new:$!\n";
39 chmod(0755,$_) || die "unable to chmod $dir/$new:$!\n";