Added libxslt-1.1.24 template.
[pkgfs.git] / helper-templates / perl-replace-path.sh
blobaa3c6a332fbc92875bd5bdf4fe47860b0cb54baa
2 # This helper transforms files with wrong perl path to the correct
3 # one pointing at PKGFS_MASTERDIR/bin/perl.
6 perl_transform_file()
8 local files="$@"
10 [ -z "$files" ] && exit 1
12 for f in ${files}; do
13 [ ! -f $f ] && continue
14 $sed_cmd -e "s|^#!.*/usr/bin/perl|#!$PKGFS_MASTERDIR/bin/perl|" \
15 $f > $f.in && $mv_cmd -f $f.in $f && \
16 echo "=> Transformed $(basename $f) with correct path."
17 done