OSDN Git Service

The method of detecting pkg command of pkgng is corrected.
authorMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 27 Jan 2013 18:31:44 +0000 (03:31 +0900)
committerMamoru Sakaue / MwGhennndo <glmwghennndo@users.sourceforge.jp>
Sun, 27 Jan 2013 18:31:44 +0000 (03:31 +0900)
modified:   portsreinstall

portsreinstall

index 85773d7..db37a00 100755 (executable)
@@ -10,7 +10,7 @@
 # ================================================
 
 APPNAME=`basename "$0"`
-MYVERSION=2.2.2+toward_2.2.3_20130128022414
+MYVERSION=2.2.2+toward_2.2.3_20130128033128
 
 PREFIX=${PREFIX:-/usr/local}
 CONFFILE=${PREFIX}/etc/${APPNAME}.conf
@@ -404,7 +404,7 @@ WITH_PKGNG=`make -C "${PORTSDIR}" -V WITH_PKGNG | tr '[:upper:]' '[:lower:]'`
 
 if [ "x$WITH_PKGNG" = xyes ]
 then
-       which -s pkg || { echo "ERROR: WITH_PKGNG is set, but pkgng is not available" >&2; exit 1; }
+       [ -x /usr/local/sbin/pkg ] || { echo "ERROR: WITH_PKGNG is set, but pkgng is not available" >&2; exit 1; }
        command_pkg_info='pkg info'
        command_pkg_create='pkg create'
        command_pkg_delete='pkg delete'