| Commit | Line | Data |
|---|---|---|
| 642f1a42 MS |
1 | #!/bin/sh |
| 2 | # | |
| 3 | # Copyright (c) 2007 The DragonFly Project. All rights reserved. | |
| 4 | # | |
| 5 | # This code is derived from software contributed to The DragonFly Project | |
| 6 | # by Simon 'corecode' Schubert <corecode@fs.ei.tum.de>. | |
| 7 | # | |
| 8 | # Redistribution and use in source and binary forms, with or without | |
| 9 | # modification, are permitted provided that the following conditions are met: | |
| 10 | # | |
| 11 | # - Redistributions of source code must retain the above copyright notice, | |
| 12 | # this list of conditions and the following disclaimer. | |
| 13 | # - Redistributions in binary form must reproduce the above copyright notice, | |
| 14 | # this list of conditions and the following disclaimer in the documentation | |
| 15 | # and/or other materials provided with the distribution. | |
| 16 | # - Neither the name of The DragonFly Project nor the names of its | |
| 17 | # contributors may be used to endorse or promote products derived | |
| 18 | # from this software without specific, prior written permission. | |
| 19 | # | |
| 20 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
| 21 | # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
| 22 | # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
| 23 | # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR | |
| 24 | # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
| 25 | # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | |
| 26 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | |
| 27 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | |
| 28 | # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | |
| 29 | # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
| 30 | # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
| 31 | # | |
| 32 | # $DragonFly: src/usr.bin/pkg_radd/pkg_radd.sh,v 1.1 2008/01/05 10:14:26 matthias Exp $ | |
| 33 | ||
| 34 | if [ -z "$BINPKG_SITES" ] | |
| 35 | then | |
| 68749181 | 36 | osver=`uname -r | awk -F - '{ print $1; }'` |
| 3d62c9e3 JS |
37 | cpuver=`uname -p | awk -F - '{ print $1; }'` |
| 38 | BINPKG_SITES=http://avalon.dragonflybsd.org/packages/$cpuver/DragonFly-$osver/stable | |
| 642f1a42 MS |
39 | [ -f /etc/settings.conf ] && . /etc/settings.conf |
| 40 | fi | |
| 41 | ||
| 42 | if [ -z "$PKG_PATH" ] | |
| 43 | then | |
| 44 | PKG_PATH=$BINPKG_SITES/All | |
| 45 | fi | |
| 46 | ||
| 47 | export PKG_PATH | |
| 48 | ||
| 49 | exec pkg_add "$@" |