Bug #6694

flow3 shell script uses non POSIX commands

Added by Thomas Fritz over 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Could have
Category:
Core
Start date:
2010-03-04
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

Description

On line 36 (rev3903):

FLOW3ROOTPATH="$(dirname "$(test -L "$0" && readlink "$0" || echo "$0")")" 

readlink is not POSIX compliant. So there is no guarantee that the shell script works on every Unixoid OS - for instance MAC, there is no readlink.

A working solution for the above problem would be:

#!/bin/bash
# Path the script is called from.
FLOW3_ORIGINALPATH="$(pwd)" 
cd "$(dirname $0)" 
FLOW3_ROOTPATH="$(pwd)" 
cd "${FLOW3_ORIGINALPATH}" 
#1

Updated by Karsten Dambekalns over 11 years ago

  • Status changed from New to Accepted
  • Assignee set to Karsten Dambekalns
  • Priority changed from Must have to Could have

Well, my Snow Leopard has /usr/bin/readlink...

#2

Updated by Karsten Dambekalns over 11 years ago

  • Tracker changed from Task to Bug
#3

Updated by Karsten Dambekalns over 11 years ago

  • Category changed from Environment to Core
  • Target version set to 1.0 alpha 8
#4

Updated by Karsten Dambekalns over 11 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

As of r3916:
[+FEATURE] FLOW3 (Core): Made the flow3 shell script configurable regarding PHP binary, context and paths used through Configuration/flow3.sh. Resolves #6681. T3BOARD10 Bug Auction.
[+BUGFIX] FLOW3 (Core): Two compliance fixes to flow3.sh, fixes #6693, fixes #6694. T3BOARD10 Bug Auction bonus fixes. :)

Also available in: Atom PDF