diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-17 10:00:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-01-17 10:00:55 +0000 |
commit | 8eb498e039c4767ed5d485d1aa65994645816b74 (patch) | |
tree | 0af4e445265acdc2830f0a97e6d82e007abf05d4 /buildrepo | |
parent | 1a28d3898bc585a57c14f6e26172ff3b3c43af8f (diff) | |
download | abuild-8eb498e039c4767ed5d485d1aa65994645816b74.tar.gz abuild-8eb498e039c4767ed5d485d1aa65994645816b74.tar.bz2 abuild-8eb498e039c4767ed5d485d1aa65994645816b74.tar.xz abuild-8eb498e039c4767ed5d485d1aa65994645816b74.zip |
buildrepo: added -r option to specify dependency repos
the dependency repo tells apk index that dependencies are found
in another repository.
Diffstat (limited to 'buildrepo')
-rwxr-xr-x | buildrepo | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -7,13 +7,16 @@ repodir=${REPODIR:-$HOME/packages} usage() { - echo "usage: $program [-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ] REPOSITORY..." + echo "usage: $program [-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ]" + echo " [-r DEPREPO] REPOSITORY..." + echo "options:" echo " -a Set the aports base dir to APORTSDIR instead of $aportsdir" echo " -d Set destination repository base dir to REPODIR instead of $repodir" echo " -h Show this help and exit" echo " -l Send build to logfile, prefixed by LOGPREFIX" echo " -p Purge obsolete packages from REPODIR after build" + echo " -r Dependencies are found in DEPREPO" exit 1 } @@ -47,20 +50,26 @@ build() { ) || return 1 done cd "$repodir/$repo" + echo ">>> Generating Index..." md5sum *.apk | gzip -9 > INDEX.md5.gz if which apk >/dev/null; then - apk index *.apk | gzip -9 > APK_INDEX.gz + local deps + for i in $deprepo; do + deps="--repo $repodir/$i" + done + apk $deps index *.apk | gzip -9 > APK_INDEX.gz fi purge "$repo" } -while getopts "a:d:hl:p" opt; do +while getopts "a:d:hl:pr:" opt; do case "$opt" in a) aportsdir=$OPTARG;; d) repodir=$OPTARG;; h) usage >&2;; l) logprefix=$OPTARG;; p) dopurge=1;; + r) deprepo="$deprepo $OPTARG";; esac done shift $(($OPTIND - 1)) |