diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-02-07 16:55:14 +0100 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-02-07 16:55:14 +0100 |
commit | d381b9b6e967ca25f09a6ce300d8afa1139923f6 (patch) | |
tree | 5d48b2734f003c52899acbc01f79ba92419469ae /examples | |
parent | 8042a42390155d29ad4b78a6173f3be48745ce84 (diff) |
pkglist: Use a slightly more descriptive for loop variable
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/pkglist | 16 |
1 files changed, 8 insertions, 8 deletions
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 } } |