Opened 7 years ago

Closed 7 years ago

#52954 closed defect (fixed)

xlsx2csv @1.2 darwin: bad bash test for gnused searching exact file gsed without path and never to be found

Reported by: energo80 Owned by: bithead2k
Priority: Normal Milestone:
Component: ports Version: 2.3.5
Keywords: haspatch Cc: ryandesign (Ryan Carsten Schmidt), kurthindenburg (Kurt Hindenburg)
Port: xlsx2csv

Description (last modified by ryandesign (Ryan Carsten Schmidt))

This is current code in line

gnused=$(which sed)
[[ "${platform}" == "Darwin" ]] && gnused=gsed
[[ -f "$gnused" ]] || { ERROR....}

should be changed to

which $gnused || error

Attachments (1)

xlsx2csv.diff (1.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 7 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign added
Description: modified (diff)
Keywords: haspatch added
Owner: changed from macports-tickets@… to kirk@…
Status: newassigned

You should not rely on which returning a nonzero exit code when a program is not found; on Tiger, it doesn't do that.

I propose a different fix; attached.

Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: xlsx2csv.diff added

comment:2 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Cc: kurthindenburg added

Kirk's site doesn't appear to be valid any longer - all I could find is https://web.archive.org/web/20150910223552/http://kirk.webfinish.com/?p=91

Perhaps it should be removed and another actively maintainer converter could be added.

Also, on the couple of xlsx files I have, the script didn't work

comment:3 Changed 7 years ago by bithead2k

Sorry, website was created with wordpress. It got hacked, and i never got it fixed.

I didn't see the notification for this bug until now. This port is not very active. The patch looks reasonable, so I'll integrate it.

comment:4 Changed 7 years ago by mf2k (Frank Schima)

@bithead2k: ping?

comment:5 Changed 7 years ago by kurthindenburg (Kurt Hindenburg)

Resolution: fixed
Status: assignedclosed

In c3a3b5ae74684f301519475d24101278338d06d0/macports-ports:

xlsx2csv: add patch to find gsed

set homepage to web.archive.org link; set livecheck to none

closes #52954

Note: See TracTickets for help on using tickets.