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