Ticket #514: update_workspaces.patch

File update_workspaces.patch, 801 bytes (added by alan, 12 years ago)

readlink -f doesn't work on mac,fall back to perl in that case

  • update-workspaces.sh

     
    99# Check for whitespace in absolute path; this will cause problems in the
    1010# SpiderMonkey build (https://bugzilla.mozilla.org/show_bug.cgi?id=459089)
    1111# and maybe elsewhere, so we just forbid it
    12 SCRIPT=$(readlink -f "$0")
    13 SCRIPTPATH=`dirname "$SCRIPT"`
     12SCRIPT=$(readlink -f "$0" 2>/dev/null)
     13if (($?))
     14then
     15  SCRIPTPATH=`perl -e 'use Cwd "abs_path";use File::Basename;print dirname(abs_path(shift))' $0`
     16else
     17  SCRIPTPATH=`dirname "$SCRIPT"`
     18fi
     19
    1420case "$SCRIPTPATH" in
    1521  *\ * )
    1622    die "Absolute path contains whitespace, which will break the build - move the game to a path without spaces" ;;