Jump to content

Custom tools on Mac OSX

custom tools osx shell script

  • Please log in to reply
No replies to this topic

#1 jennievh



  • Members
  • Pip
  • 2 posts

Posted 07 September 2016 - 06:56 PM

I am trying to create a preflight custom tool using ElectricCloud. We already have a script that will run the preflight given the changelist number.

The online document (https://www.perforce...stom_tools.html) says "On a Mac, custom tools are not launched from a shell by default. For tools that must recognize P4CONFIG settings, create a script that launches a shell before invoking the tool, or define P4CONFIG globally (for example, in /etc/profile,/etc/profile.local, or /etc/csh.login)."

I have created a shell script:

#!/bin/sh -e

export P4CONFIG=/Users/jennievh/.p4config

echo "Running preflight"

/Users/jennievh/Perforce/jvanheuit_mb2/gn-sdks/preflight/preflight.sh $*

echo "Done running preflight"

which executes perfectly at the command line, but it always fails with "Error: missing p4 command line utility."

My .p4config file defines P4USER, P4CLIENT, P4PORT, and PATH (adding the bin directory where the script lives).

How do you implement custom tools successfully on Mac OS X?

Also tagged with one or more of these keywords: custom, tools, osx, shell, script

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users