summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2012-05-25 19:01:58 +0200
committerJustin Davis <jrcd83@gmail.com>2012-05-25 19:01:58 +0200
commitb8f646644c55ef27b766d282c8b01284a19b2c70 (patch)
treec1a3692dd46c8db51dcf0e38704bed3e141ed851
parentbed4f6a720db164326eb958d03fc487ac81e732a (diff)
downloadgenpkg-b8f646644c55ef27b766d282c8b01284a19b2c70.tar.gz
genpkg-b8f646644c55ef27b766d282c8b01284a19b2c70.tar.xz
Pretty up field init a little bit.
-rwxr-xr-xbin/pbfields13
1 files changed, 7 insertions, 6 deletions
diff --git a/bin/pbfields b/bin/pbfields
index a27948a..b7b3934 100755
--- a/bin/pbfields
+++ b/bin/pbfields
@@ -9,13 +9,14 @@ BEGIN {
" url *source *noextract *md5sums *sha512sums" \
" _dir"
max = split(fieldstr, fields)
- for(i=1; i<=max; i++) {
- if(sub(/^[*]/, "", fields[i])){
- arrfield[fields[i]] = 1
- }else if(sub(/^_/, "", fields[i])){
- cfield[fields[i]] = 1
+ for(i = 1; i <= max; i++){
+ f = fields[i]
+ if(sub(/^[*]/, "", f)){
+ arrfield[f] = 1
+ }else if(sub(/^_/, "", f)){
+ cfield[f] = 1
}else{
- strfield[fields[i]] = 1
+ strfield[f] = 1
}
}