From d381b9b6e967ca25f09a6ce300d8afa1139923f6 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 7 Feb 2010 16:55:14 +0100 Subject: pkglist: Use a slightly more descriptive for loop variable --- examples/pkglist | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples') diff --git a/examples/pkglist b/examples/pkglist index 25737f1..7e6747f 100755 --- a/examples/pkglist +++ b/examples/pkglist @@ -18,22 +18,22 @@ setopt err_exit cd $1 shift -for i in *(-/); { +for dir in *(-/); { # git repo - if [[ -d $i/.git ]] { - echo -n "$i git " - echo -n ${$(git --git-dir=$i/.git log -n 1)[2]} + if [[ -d $dir/.git ]] { + echo -n "$dir git " + echo -n ${$(git --git-dir=$dir/.git log -n 1)[2]} echo " $*" # bare git repo - } elif [[ -d $i/objects && -d $i/refs ]] { - echo -n "$i git " - echo -n ${$(git --git-dir=$i log -n 1)[2]} + } elif [[ -d $dir/objects && -d $dir/refs ]] { + echo -n "$dir git " + echo -n ${$(git --git-dir=$dir log -n 1)[2]} echo " $*" # unknown } else { - echo "$i: Unsupported or no repository" >&2 + echo "$dir: Unsupported or no repository" >&2 } } -- cgit v1.2.3