Commit 67e769e6 authored by Natanael Copa's avatar Natanael Copa

buildrepo: avoid using 'i' as loop variable

some apkbuilds use it in global context
parent a1b0ccbb
...@@ -20,7 +20,7 @@ fi ...@@ -20,7 +20,7 @@ fi
usage() { usage() {
echo "usage: $program [-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ]" echo "usage: $program [-a APORTSDIR] [-d REPODIR] [-hp] [-l LOGPREFIX ]"
echo " [-r DEPREPO] REPOSITORY..." echo " [-r DEPREPO] REPOSITORY..."
echo "options:" echo "options:"
echo " -a Set the aports base dir to APORTSDIR instead of $aportsdir" 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 " -d Set destination repository base dir to REPODIR instead of $repodir"
...@@ -87,10 +87,10 @@ list_needbuild() { ...@@ -87,10 +87,10 @@ list_needbuild() {
# first we try copy everything possible and find out which we need # first we try copy everything possible and find out which we need
# to rebuild. By doing this we might save us for rebuilding # to rebuild. By doing this we might save us for rebuilding
# needed when running 'abuild -R' # needed when running 'abuild -R'
for i in */APKBUILD; do for apkbuild in */APKBUILD; do
[ -f "$aportsdir/$repo/$i" ] || continue [ -f "$aportsdir/$repo/$apkbuild" ] || continue
export REPODEST="$repodir" export REPODEST="$repodir"
cd "$aportsdir/$repo"/${i%/*} || return 1 cd "$aportsdir/$repo"/${apkbuild%/*} || return 1
pkgname= pkgname=
pkgver= pkgver=
pkgrel= pkgrel=
...@@ -118,9 +118,9 @@ list_needbuild() { ...@@ -118,9 +118,9 @@ list_needbuild() {
echo ">>> Copying " $pkgs >&2 echo ">>> Copying " $pkgs >&2
cp -p -l $pkgs "$repodir/$repo/$CARCH"/ 2>/dev/null \ cp -p -l $pkgs "$repodir/$repo/$CARCH"/ 2>/dev/null \
|| cp -p $pkgs "$repodir/$repo/$CARCH"/ \ || cp -p $pkgs "$repodir/$repo/$CARCH"/ \
|| echo "$i" || echo "$apkbuild"
else else
echo "$i" echo "$apkbuild"
fi fi
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