Take PORTSDIR var into account. Noticed by Brian R. Landy.

This commit is contained in:
espie 2001-07-19 02:49:56 +00:00
parent 5deda30c17
commit 1211f04ece
2 changed files with 14 additions and 10 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: find-build-order,v 1.3 1999/09/28 21:54:25 espie Exp $
# $OpenBSD: find-build-order,v 1.4 2001/07/19 02:49:56 espie Exp $
# Copyright (c) 1999 Marc Espie. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
@ -26,6 +26,9 @@
# dependency list, so that you may build things in order.
# input is of the form: dir/package BUILD_PARAM1=something...
# and output is a list of dir/package
: ${PORTSDIR:=/usr/ports}
case "$1" in
"build")
type=depends-list;;
@ -41,8 +44,8 @@ do
\#*);; # comments
*)
echo "Depending $i" >&2
cd /usr/ports/$i && make FULL_PACKAGE_NAME=yes $j $type
k=`cd /usr/ports/$i && make FULL_PACKAGE_NAME=yes $j package-name`
cd ${PORTSDIR}/$i && make FULL_PACKAGE_NAME=yes $j $type
k=`cd ${PORTSDIR}/$i && make FULL_PACKAGE_NAME=yes $j package-name`
echo "$k $k";;
esac
done)|tsort|tail -r

View File

@ -1,5 +1,5 @@
#!/bin/sh
# $OpenBSD: out-of-date,v 1.4 2001/03/07 03:41:10 form Exp $
# $OpenBSD: out-of-date,v 1.5 2001/07/19 02:49:56 espie Exp $
# Copyright (c) 1999
# Marc Espie. All rights reserved.
# Redistribution and use in source and binary forms, with or without
@ -26,13 +26,14 @@
# Check for simple discrepancies between installed packages and the
# /usr/ports INDEX
FILE=/usr/ports/INDEX
: ${PORTSDIR:=/usr/ports}
FILE=${PORTSDIR}/INDEX
echo ">>> Is ${PORTSDIR}/INDEX up-to-date ?"
echo ">>> Otherwise, this script will find out outdated flavors of packages"
echo ">>> compared to your installed packages..."
cat <<EOF
>>> Is /usr/ports/INDEX up-to-date ?
>>> Otherwise, this script will find out outdated flavors of packages
>>> compared to your installed packages...
EOF
pkg_info |while read fullname rest
do
grep "^$fullname" $FILE >/dev/null || {