diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-03-16 07:53:30 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2019-03-05 16:14:34 +0100 |
commit | c52cb4942c32d57166f0193b9e12db6582258655 (patch) | |
tree | a13e7793d4a8c656645e8097a74b46a95af02842 | |
parent | d732ae584b293a8826a4b08d202cf16f24cdaa8b (diff) | |
download | aports-c52cb4942c32d57166f0193b9e12db6582258655.tar.bz2 aports-c52cb4942c32d57166f0193b9e12db6582258655.tar.xz |
scripts/mkimage.sh: allow --repository multiple times
we dont need --extra-repository anymore but keep it for backwards
compatibility
-rwxr-xr-x | scripts/mkimage.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/mkimage.sh b/scripts/mkimage.sh index 8d7c4de8e1..b9211f51eb 100755 --- a/scripts/mkimage.sh +++ b/scripts/mkimage.sh @@ -201,7 +201,13 @@ while [ $# -gt 0 ]; do opt="$1" shift case "$opt" in - --repository) REPODIR="$1"; shift ;; + --repository) + if [ -z "$REPOS" ]; then + REPOS="$1" + else + REPOS=$(printf '%s\n%s' "$REPOS" "$1"); + fi + shift ;; --extra-repository) EXTRAREPOS="$EXTRAREPOS $1"; shift ;; --workdir) WORKDIR="$1"; shift ;; --outdir) OUTDIR="$1"; shift ;; @@ -256,10 +262,10 @@ for ARCH in $req_arch; do cp -Pr /etc/apk/keys "$APKROOT/etc/apk/" abuild-apk --arch "$ARCH" --root "$APKROOT" add --initdb - if [ -z "$REPODIR" ]; then + if [ -z "$REPOS" ]; then warning "no repository set" fi - echo "$REPODIR" > "$APKROOT/etc/apk/repositories" + echo "$REPOS" > "$APKROOT/etc/apk/repositories" for repo in $EXTRAREPOS; do echo "$repo" >> "$APKROOT/etc/apk/repositories" done |