Switch pkg_radd and pkg_search to appropriate CPU type path, i386 or amd64.
authorJustin C. Sherrill <justin@leaf.dragonflybsd.org>
Sun, 13 Sep 2009 19:55:37 +0000 (12:55 -0700)
committerJustin C. Sherrill <justin@leaf.dragonflybsd.org>
Sun, 13 Sep 2009 19:55:37 +0000 (12:55 -0700)
usr.bin/pkg_radd/pkg_radd.sh
usr.bin/pkg_search/pkg_search.sh

index e92cb7e..4ee91c9 100644 (file)
@@ -34,7 +34,8 @@
 if [ -z "$BINPKG_SITES" ]
 then
        osver=`uname -r | awk -F - '{ print $1; }'`
-       BINPKG_SITES=http://avalon.dragonflybsd.org/packages/DragonFly-$osver/stable
+       cpuver=`uname -p | awk -F - '{ print $1; }'`
+       BINPKG_SITES=http://avalon.dragonflybsd.org/packages/$cpuver/DragonFly-$osver/stable
        [ -f /etc/settings.conf ] && . /etc/settings.conf
 fi
 
index a065938..5c2a145 100644 (file)
 
 UNAME=`uname -s`
 VERSION=`uname -r | awk -F - '{ print $1; }'`
+CPU=`uname -p | awk -F - '{ print $1; }'`
 NO_INDEX=0
 PORTSDIR=/usr/pkgsrc
 PKGSUM=${PORTSDIR}/pkg_summary
 if [ -z "$BINPKG_SITES" ]; then
-       BINPKG_SITES=http://avalon.dragonflybsd.org/packages/${UNAME}-${VERSION}/stable/
+       BINPKG_SITES=http://avalon.dragonflybsd.org/packages/${CPU}/${UNAME}-${VERSION}/stable/
        [ -f /etc/settings.conf ] && . /etc/settings.conf
 fi
 PKGSRCBOX1=$BINPKG_SITES
-PKGSRCBOX2=http://avalon.dragonflybsd.org/packages/DragonFly-2.2.0/stable/
+PKGSRCBOX2=http://avalon.dragonflybsd.org/packages/i386/DragonFly-2.2.0/stable/
 INDEXFILE=INDEX
 
 # Download the pkg_summary file