diff options
author | eik <eik@FreeBSD.org> | 2004-06-18 15:42:06 +0800 |
---|---|---|
committer | eik <eik@FreeBSD.org> | 2004-06-18 15:42:06 +0800 |
commit | f18d20fd27fd1b2544885aef0c6ea90676948187 (patch) | |
tree | d853aa40db27645048007494070b002b1c29bdc6 /security/portaudit-db | |
parent | 2df2f40741f3b584b312c68882bf27d06daa56f8 (diff) | |
download | freebsd-ports-graphics-f18d20fd27fd1b2544885aef0c6ea90676948187.tar.gz freebsd-ports-graphics-f18d20fd27fd1b2544885aef0c6ea90676948187.tar.zst freebsd-ports-graphics-f18d20fd27fd1b2544885aef0c6ea90676948187.zip |
make BASEURL customizable
Diffstat (limited to 'security/portaudit-db')
-rw-r--r-- | security/portaudit-db/Makefile | 2 | ||||
-rw-r--r-- | security/portaudit-db/files/packaudit.sh | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/security/portaudit-db/Makefile b/security/portaudit-db/Makefile index 2451ac2d2e2..4d264698f89 100644 --- a/security/portaudit-db/Makefile +++ b/security/portaudit-db/Makefile @@ -6,7 +6,7 @@ # PORTNAME= portaudit-db -PORTVERSION= 0.2 +PORTVERSION= 0.2.1 CATEGORIES= security DISTFILES= diff --git a/security/portaudit-db/files/packaudit.sh b/security/portaudit-db/files/packaudit.sh index 5695124e5f6..6b04da90418 100644 --- a/security/portaudit-db/files/packaudit.sh +++ b/security/portaudit-db/files/packaudit.sh @@ -37,6 +37,7 @@ CAT=/bin/cat DATE=/bin/date ENV=/usr/bin/env MD5=/sbin/md5 +MKDIR="/bin/mkdir -p" MKTEMP=/usr/bin/mktemp RM=/bin/rm SED=/usr/bin/sed @@ -53,10 +54,17 @@ STYLESHEET="%%DATADIR%%/vuxml2portaudit.xslt" PUBLIC_HTML="${PUBLIC_HTML:-$HOME/public_html/portaudit}" HTMLSHEET="%%DATADIR%%/vuxml2html.xslt" -BASEURL="http://people.freebsd.org/~eik/portaudit/" +BASEURL="${BASEURL:-http://people.freebsd.org/~eik/portaudit/}" PORTAUDIT2VUXML="%%DATADIR%%/portaudit2vuxml.awk" +[ -d "$DATABASEDIR" ] || $MKDIR "$DATABASEDIR" + +if [ ! -w "$DATABASEDIR" ]; then + echo "$DATABASEDIR is not writable by you, exiting." + exit 1 +fi + TMPNAME=`$BASENAME "$0"` VULVER=`$SED -En -e '/^.*\\$FreeBSD\: [^$ ]+,v ([0-9]+(\.[0-9]+)+) [^$]+\\$.*$/{s//\1/p;q;}' "$VUXMLDIR/vuln.xml"` @@ -64,7 +72,7 @@ VULURL="http://cvsweb.freebsd.org/ports/security/vuxml/vuln.xml?rev=$VULVER" [ -r "%%PREFIX%%/etc/packaudit.conf" ] && . "%%PREFIX%%/etc/packaudit.conf" -if [ -d "$PUBLIC_HTML" ]; then +if [ -d "$PUBLIC_HTML" -a -w "$PUBLIC_HTML" ]; then VULNMD5=`$CAT "$VUXMLDIR/vuln.xml" "$PORTAUDITDBDIR/database/portaudit.xml" "$PORTAUDITDBDIR/database/portaudit.txt" | $MD5` if [ -f "$PUBLIC_HTML/portaudit.md5" ]; then VULNMD5_OLD=`$CAT "$PUBLIC_HTML/portaudit.md5"` |