Commit ac546c49 authored by Natanael Copa's avatar Natanael Copa

scripts/mkimage.sh: allow --repository multiple times

we dont need --extra-repository anymore but keep it for backwards
compatibility
parent cfa04666
...@@ -201,7 +201,13 @@ while [ $# -gt 0 ]; do ...@@ -201,7 +201,13 @@ while [ $# -gt 0 ]; do
opt="$1" opt="$1"
shift shift
case "$opt" in 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 ;; --extra-repository) EXTRAREPOS="$EXTRAREPOS $1"; shift ;;
--workdir) WORKDIR="$1"; shift ;; --workdir) WORKDIR="$1"; shift ;;
--outdir) OUTDIR="$1"; shift ;; --outdir) OUTDIR="$1"; shift ;;
...@@ -256,10 +262,10 @@ for ARCH in $req_arch; do ...@@ -256,10 +262,10 @@ for ARCH in $req_arch; do
cp -Pr /etc/apk/keys "$APKROOT/etc/apk/" cp -Pr /etc/apk/keys "$APKROOT/etc/apk/"
abuild-apk --arch "$ARCH" --root "$APKROOT" add --initdb abuild-apk --arch "$ARCH" --root "$APKROOT" add --initdb
if [ -z "$REPODIR" ]; then if [ -z "$REPOS" ]; then
warning "no repository set" warning "no repository set"
fi fi
echo "$REPODIR" > "$APKROOT/etc/apk/repositories" echo "$REPOS" > "$APKROOT/etc/apk/repositories"
for repo in $EXTRAREPOS; do for repo in $EXTRAREPOS; do
echo "$repo" >> "$APKROOT/etc/apk/repositories" echo "$repo" >> "$APKROOT/etc/apk/repositories"
done done
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment