Results 1 to 2 of 2

Thread: Relative path set to PATH in script

  1. #1
    Join Date
    May 2009
    Beans
    32

    Relative path set to PATH in script

    I'm having a hard time finding a way to do something. This is probably kind of stupid but I want to add a path to the enviroment PATH, the problem is the script isn't going to know where it lives.

    There is a tool that comes bundled with a project, project1/tools and that path needs to be set when making project 2.

    so I tried (and failed) to do something like this

    #!/bin/bash
    PATH=PATH:project1/tools
    make project2

  2. #2
    Join Date
    Jan 2012
    Beans
    342

    Re: Relative path set to PATH in script

    savagetwinky ..

    The reason for it failing is that the word "PATH" isn't a variable .. $PATH is ..

    Code:
    PATH=/project1/tools:$PATH
    HTH ...

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •