FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 11-17-2009, 06:18 PM
Isaac Good
 
Default 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
 
Old 11-20-2009, 02:44 AM
"Allan McRae"
 
Default Replace an ugly while [ with a for (( loop (makepkg)

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
 

Thread Tools




All times are GMT. The time now is 04:38 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org