Project

General

Profile

Bug #11224

nightly.sh should be executable for whence(1) to find it

Added by Michal Nowak 3 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
tools - gate/build tools
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Bite-size
Tags:

Description

I setup illumos-gate sources on OpenIndiana according to https://illumos.org/docs/developers/build/ but I get following unexpected output:

newman:~/ws/illumos-gate $ time ksh93 usr/src/tools/scripts/nightly.sh illumos.sh 
Usage: dirname [-frx] string

With some verbose options in the nightly.sh script it turns out that whence(1) is unable to find nightly.sh:

  61 # Get the absolute path of the nightly script that the user invoked.  This
  62 # may be a relative path, and we need to do this before changing directory.
  63 nightly_path=`whence $0`
  64 
  65 #
  66 # Keep track of where we found nightly so we can invoke the matching
  67 # which_scm script.  If that doesn't work, don't go guessing, just rely
  68 # on the $PATH settings, which will generally give us either /opt/onbld
  69 # or the user's workspace.
  70 #
  71 WHICH_SCM=$(dirname $nightly_path)/which_scm

Unless nightly.sh is made executable.

GitHub: https://github.com/illumos/illumos-gate/pull/58

Also available in: Atom PDF