Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6391045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:37:25+00:00 2026-05-25T03:37:25+00:00

Trying to run a simple script attached to my xcode project as follows… if

  • 0

Trying to run a simple script attached to my xcode project as follows…

if [ -d '$HOME/data' ]; 
then
  cd "$HOME/data/"
  rsync -t *.plist '$SRCROOT/data/'
fi

exit 0

The script seems to run fine if I run it outside of XCode but when running from XCode I’m getting the following error…

line 2: SRCROOT: command not found

Seems the SRCROOT variable isn’t detectable in the script but my understanding was that this is one of the environment variables that should be passed and accessible to the script. Any thought?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T03:37:26+00:00Added an answer on May 25, 2026 at 3:37 am

    Turns out this was my fault. The script was actually not being called at all. In XCode I was referring to the path of the script using…

    "./$(SRCROOT)/myScript.sh"
    

    Switching it to…

    "$SRCROOT/myScript.sh"
    

    Corrected the problem and indeed I can access $SRCROOT from my script now.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a simple cgi script after configuring my server. My
I am trying to run simple perl dbi example script to connect to mysql
I'm trying to run a very simple browser detect script and it executes just
I'm a Powershell newbie, trying to get a simple script to run. I have
I got this error when I am trying to run a simple PhP script
I am trying to run a large script that creates a table, and then
I'm trying to run this simple script in the browser and it keeps erroring
I was trying to run a simple PHP script on Amazon EC2. As i
I have a simple script I'm trying to run: <?php print exec('whoami'); $output2 =
I am trying to run simple shell commands in my script, but am unable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.