[pacman-dev] [PATCH] Replace an ugly while [ with a for (( loop (makepkg)
From b4c17ea05ec861da20a54bc4f7490b4c28dceb37 Mon Sep 17 00:00:00 2001 From: Isaac Good <pacman@isaac.otherinbox.com> Date: Tue, 17 Nov 2009 14:16:48 -0500 Subject: [PATCH] Replace an ugly while [ with a for (( loop
Signed-off-by: Isaac Good <pacman@isaac.otherinbox.com> --- scripts/makepkg.sh.in | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index 3d776f0..1d9d8f1 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -514,11 +514,10 @@ generate_checksums() { local numsrc=${#source[@]} echo -n "${integ}sums=(" - local i=0; + local i local indent='' - while [ $i -lt $((${#integ}+6)) ]; do + for (( i = 0; i < ${#integ} + 6; i++ )); do indent="$indent " - i=$(($i+1)) done local netfile -- 1.6.5.2
Isaac Good wrote:
From b4c17ea05ec861da20a54bc4f7490b4c28dceb37 Mon Sep 17 00:00:00 2001 From: Isaac Good <pacman@isaac.otherinbox.com> Date: Tue, 17 Nov 2009 14:16:48 -0500 Subject: [PATCH] Replace an ugly while [ with a for (( loop
Signed-off-by: Isaac Good <pacman@isaac.otherinbox.com> ---
Looks good. Pushed to my working branch. Allan
participants (2)
-
Allan McRae
-
Isaac Good