aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-03-16 07:53:30 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-16 07:55:21 +0000
commit67573823ca585743e2197f3245cbdfb8b20e7488 (patch)
treed5a3f05dcb1947da25479a027ca60c00e2698003 /scripts
parent6aff7133726468dcff85a06db27696ef639317dc (diff)
downloadaports-67573823ca585743e2197f3245cbdfb8b20e7488.tar.bz2
aports-67573823ca585743e2197f3245cbdfb8b20e7488.tar.xz
scripts/mkimage.sh: allow --repository multiple times
we dont need --extra-repository anymore but keep it for backwards compatibility
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkimage.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/mkimage.sh b/scripts/mkimage.sh
index d11b05f7e6..de040aac83 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