Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#336 closed bug (fixed)

[bash/sh] fails due to weird if behaviour

Reported by: johndrinkwater Owned by: sikosis
Priority: low Milestone: R1
Component: Applications Version:
Keywords: Cc: diver
Blocked By: Blocking:
Platform: All


/boot/apps/imkit$ ./ [pops up warning shown below] /boot/apps/imkit$

Head of script:

cd "$(dirname "$0")" if pwd | grep " ";

then alert "Please install from a directory with no spaces in the path name,

the current one (pwd) has spaces. Just move all the files to somewhere that doesn't have spaces, like /boot/home/mydirectory. If there are spaces, the install script malfunctions. Sorry.";

exit 1;


Attachments (1) (5.6 KB ) - added by johndrinkwater 14 years ago.
The failing script

Download all attachments as: .zip

Change History (10)

comment:1 by korli, 14 years ago

Could you provide an easier way to reproduce this bug (ie attach a script which works in R5 and not on Haiku) ?

by johndrinkwater, 14 years ago

Attachment: added

The failing script

comment:2 by diver, 14 years ago

Cc: diver added

comment:3 by korli, 14 years ago

bug_group: developers

comment:4 by korli, 14 years ago

Cc: axeld@… added

comment:5 by korli, 14 years ago

I found a short testcase :

echo toto | false echo $?

=> it returs 1 on R5 and 0 on Haiku. Seems like a process/pipe problem. Axel, any ideas ?

comment:6 by korli, 14 years ago

Resolution: fixed

comment:7 by korli, 14 years ago

My test case is fixed by Axel as of revision 17338

comment:8 by korli, 14 years ago

Status: newclosed

comment:9 by johndrinkwater, 14 years ago

works a treat

Note: See TracTickets for help on using tickets.