Bug #6694

flow3 shell script uses non POSIX commands

Added by Thomas Fritz over 5 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2010-03-04
Priority:Could have Due date:
Assigned To:Karsten Dambekalns % Done:

100%

Category:Core
Target version:TYPO3 Flow Base Distribution - 1.0 alpha 8
PHP Version: Complexity:
Has patch: Affected Flow version:

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}" 

Associated revisions

Revision 06a00c44
Added by Karsten Dambekalns over 5 years ago

[+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. :)

History

#1 Updated by Karsten Dambekalns over 5 years ago

  • Status changed from New to Accepted
  • Assigned To 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 5 years ago

  • Tracker changed from Task to Bug

#3 Updated by Karsten Dambekalns over 5 years ago

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

#4 Updated by Karsten Dambekalns over 5 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