On Mon, 12 Nov 2018 at 21:08, Alexander Pyhalov via illumos-discuss
<[email protected]> wrote:
> When I try to build illumos-gate according to new instructions, I get
>
> time ksh93 usr/src/tools/scripts/nightly.sh ../illumos.sh
> dirname: missing operand
> Try 'dirname --help' for more information.
>
> (but build continues)
That definitely seems odd to me. Can you put the following script in
"usr/src/tools/scripts/blah.sh" and try to run it instead:
---->8----
#!/bin/ksh -p
printf '$0: "%s"\n' "$0"
printf 'whence $0: "%s"\n' "$(whence "$0")"
printf 'dirname whence $0: "%s"\n' "$(dirname "$(whence "$0")")"
i=0
while [[ $# -gt 0 ]]; do
printf 'arg[%3d]: "%s"\n' $i "$1"
(( i++ ))
shift 1
done
---->8----
When I run it with some arguments, I see this:
$ time ksh93 usr/src/tools/scripts/blah.sh -a b
$0: "usr/src/tools/scripts/blah.sh"
whence $0: "/ws/rti/usr/src/tools/scripts/blah.sh"
dirname whence $0: "/ws/rti/usr/src/tools/scripts"
arg[ 0]: "-a"
arg[ 1]: "b"
real 0m0.029s
user 0m0.009s
sys 0m0.019s
What do you see?
Cheers.
--
Joshua M. Clulow
Engineer @ Joyent
http://blog.sysmgr.org
------------------------------------------
illumos: illumos-discuss
Permalink:
https://illumos.topicbox.com/groups/discuss/Tb9ec5451a7d2f96a-M065b91b10ce75b0a24511960
Delivery options: https://illumos.topicbox.com/groups/discuss/subscription