void-packages/helper-templates/perl-replace-path.sh
Juan RP cfa18b4416 Massive renaming, pkgfs is now called xbps.
Also known as "xtraeme's build package system".

--HG--
extra : convert_revision : 119840ceae588fef65d6dcab651f607f54fa0be6
2008-10-13 07:32:05 +02:00

19 lines
410 B
Bash
Executable file

#
# This helper transforms files with wrong perl path to the correct
# one pointing at XBPS_MASTERDIR/bin/perl.
#
perl_transform_file()
{
local files="$@"
[ -z "$files" ] && exit 1
for f in ${files}; do
[ ! -f $f ] && continue
$sed_cmd -e "s|^#!.*/usr/bin/perl|#!$XBPS_MASTERDIR/bin/perl|" \
$f > $f.in && $mv_cmd -f $f.in $f && \
echo "=> Transformed $(basename $f) with correct path."
done
}