blob: 0fe58e6110b077838e768f93623bdb45aef63105 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
From 67e769e605a09338b1234b2a9503305ebd632832 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 26 Apr 2013 21:05:40 +0200
Subject: [PATCH] buildrepo: avoid using 'i' as loop variable
some apkbuilds use it in global context
---
buildrepo.in | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/buildrepo.in b/buildrepo.in
index 7707049..a37ab8d 100755
--- a/buildrepo.in
+++ b/buildrepo.in
@@ -20,7 +20,7 @@ fi
usage() {
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"
@@ -87,10 +87,10 @@ list_needbuild() {
# first we try copy everything possible and find out which we need
# to rebuild. By doing this we might save us for rebuilding
# needed when running 'abuild -R'
- for i in */APKBUILD; do
- [ -f "$aportsdir/$repo/$i" ] || continue
+ for apkbuild in */APKBUILD; do
+ [ -f "$aportsdir/$repo/$apkbuild" ] || continue
export REPODEST="$repodir"
- cd "$aportsdir/$repo"/${i%/*} || return 1
+ cd "$aportsdir/$repo"/${apkbuild%/*} || return 1
pkgname=
pkgver=
pkgrel=
@@ -118,9 +118,9 @@ list_needbuild() {
echo ">>> Copying " $pkgs >&2
cp -p -l $pkgs "$repodir/$repo/$CARCH"/ 2>/dev/null \
|| cp -p $pkgs "$repodir/$repo/$CARCH"/ \
- || echo "$i"
+ || echo "$apkbuild"
else
- echo "$i"
+ echo "$apkbuild"
fi
done
}
--
1.8.2.1
|