Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#336 closed bug (fixed)

[bash/sh] Install.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:
Has a Patch: no Platform: All

Description

/boot/apps/imkit$ ./Install.sh [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;

fi

Attachments (1)

Install.sh (5.6 KB) - added by johndrinkwater 13 years ago.
The failing script

Download all attachments as: .zip

Change History (10)

comment:1 Changed 13 years ago by korli

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

Changed 13 years ago by johndrinkwater

Attachment: Install.sh added

The failing script

comment:2 Changed 13 years ago by diver

Cc: diver added

comment:3 Changed 13 years ago by korli

bug_group: developers

comment:4 Changed 13 years ago by korli

Cc: axeld@… added

comment:5 Changed 13 years ago by korli

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 Changed 13 years ago by korli

Resolution: fixed

comment:7 Changed 13 years ago by korli

My test case is fixed by Axel as of revision 17338

comment:8 Changed 13 years ago by korli

Status: newclosed

comment:9 Changed 13 years ago by johndrinkwater

works a treat

Note: See TracTickets for help on using tickets.