Skip to content

Commit a725551

Browse files
committed
Updated test script.
1 parent aeadb56 commit a725551

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

freebsd/subnetcalc/test-packaging

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# Contact: thomas.dreibholz@gmail.com
2020

2121
PACKAGE=`cat Makefile | grep "^PORTNAME=" | sed -e "s/^PORTNAME=//g" | tr -d " \t"`
22-
UPSTREAM_VERSION=`cat Makefile | grep "^PORTVERSION=" | sed -e "s/^PORTVERSION=//g" | tr -d " \t"`
22+
UPSTREAM_VERSION=`cat Makefile | grep "^DISTVERSION=" | sed -e "s/^DISTVERSION=//g" | tr -d " \t"`
2323
PORTREVISION=`cat Makefile | grep "^PORTREVISION=" | sed -e "s/^PORTREVISION=//g" | tr -d " \t"`
2424
CATEGORY=`cat Makefile | grep "^CATEGORIES=" | sed -e "s/^CATEGORIES=//g" | tr -d " \t"`
2525

@@ -41,7 +41,9 @@ if [ -e work ] ; then
4141
rm -rf work
4242
fi
4343
rm -f ${PACKAGE}-${PACKAGE_VERSION}.txz
44-
find /usr/ports/packages -name "${PACKAGE}*.txz" | xargs rm -f
44+
if [ -d work/pkg ] ; then
45+
find work/pkg -name "${PACKAGE}*.txz" | xargs rm -f
46+
fi
4547

4648

4749
echo "1. ###### make deinstall ##############################################" && \
@@ -53,19 +55,19 @@ make package && \
5355
echo "4. ###### make deinstall ##############################################" && \
5456
make deinstall && \
5557
echo "5. ###### pkg add #####################################################" && \
56-
if [ ! -e "/usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.pkg" ] ; then
57-
echo >&2 "ERROR: Package /usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.pkg not found!"
58+
if [ ! -e "work/pkg/${PACKAGE}-${PACKAGE_VERSION}.pkg" ] ; then
59+
echo >&2 "ERROR: Package work/pkg/${PACKAGE}-${PACKAGE_VERSION}.pkg not found!"
5860
exit 1
5961
fi && \
60-
pkg add /usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.pkg && \
62+
pkg add work/pkg/${PACKAGE}-${PACKAGE_VERSION}.pkg && \
6163
echo "6. ###### make deinstall ##############################################" && \
6264
make deinstall && \
6365
echo "7. ###### make reinstall ##############################################" && \
6466
make reinstall && \
6567
echo "8. ###### make package ################################################" && \
6668
make package && \
6769
echo "9. ###### tar tzvf *.pkg ##############################################" && \
68-
tar tzvf /usr/ports/packages/All/${PACKAGE}-${PACKAGE_VERSION}.pkg && \
70+
tar tzvf work/pkg/${PACKAGE}-${PACKAGE_VERSION}.pkg && \
6971
echo "Running portlint ..." && \
7072
portlint && \
7173
echo "====== Successfully completed! ======"

0 commit comments

Comments
 (0)