Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 4 Nov 2002 23:52:06 -0500
From:      Frank Laszlo <laszlof@freebsdmatrix.net>
To:        ports@freebsd.org
Subject:   script to insert the PORTCOMMENT variable into the Makefile
Message-ID:  <200211042352.13586.laszlof@freebsdmatrix.net>

next in thread | raw e-mail | index | archive | help

--------------Boundary-00=_UU6381Y8LAVE2K3XJB9M
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Attached is a script that will convert the current ports tree to use the =
new=20
PORTCOMMENT format.. It basically takes the contents of pkg-comment and=20
inserts a varible (PORTCOMMENT) into a temporary copy of the Makefile. It=
=20
inserts this variable under the PORTVERSION. It then moves the temporary =
file=20
to the actual Makefile and deletes the old pkg-comment. This script recus=
ivly=20
searches for the pkg-comment file to modify the ports it needs to.=20
I hope this script will help you form to the new port structure. If you h=
ave=20
any questions, please contact me.. Thanks

- -Frank Laszlo
<laszlof@freebsdmatrix.net>
- --=20
=09Excellence is THE trend of the '80s.  Walk into any shopping
mall bookstore, go to the rack where they keep the best-sellers such as
"Garfield Gets Spayed", and you'll see a half-dozen books telling you
how to be excellent: "In Search of Excellence", "Finding Excellence",
"Grasping Hold of Excellence", "Where to Hide Your Excellence at Night
So the Cleaning Personnel Don't Steal It", etc.
=09=09-- Dave Barry, "In Search of Excellence"
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9x054nVXIPcm37VQRAuroAJ9J0Sehw2AIHouQq6LwFthAomzhTQCcCTLJ
RrjfhgwaoQ2ZxrTNRzAd+tU=3D
=3DWr1+
-----END PGP SIGNATURE-----

--------------Boundary-00=_UU6381Y8LAVE2K3XJB9M
Content-Type: application/x-shellscript;
  name="portcomment.sh"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="portcomment.sh"

#=09portcomment.sh - Script to update current ports tree to new pkg-comme=
nt structure
#=09Nov 4, 2002
#=09by Frank Laszlo <laszlof@freebsdmatrix.net
#=09$FreeBSD$

#!/bin/sh
UID=3D`id -u`
if [ $UID !=3D "0" ]=20
then
=09echo "You must be superuser to execute this command"
=09echo "UID: $UID"
=09exit 1;
else
echo "Gathering Directory Information...(this may take a while)"
for dir in `find . -name pkg-comment | sed "s/\/pkg-comment//g"`
do
=09echo "Processing data in $dir"
=09VERSION_STR=3D`grep PORTVERSION=3D $dir"/Makefile" |head -1`
=09sed  -- "s|$VERSION_STR|$VERSION_STR =0DPORTCOMMENT=3D=09`cat $dir'/pk=
g-comment'`|g" $dir"/Makefile" > $dir"/Makefile.tmp1"
=09perl -p -e 's/\r/\n/' < $dir"/Makefile.tmp1" > $dir"/Makefile"
=09rm $dir"/Makefile.tmp1" $dir"/pkg-comment"
done
fi


--------------Boundary-00=_UU6381Y8LAVE2K3XJB9M--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200211042352.13586.laszlof>