Closed zchee closed 8 years ago
I'm fine with using the absolute paths on principle - though I tend to write a shell script with a specific (minimal) shell in mind. This script's shebang is /bin/sh
. Do you have /bin/sh
invoking zsh, or otherwise somehow run prepare_iso.sh via zsh normally?
@timsutton Oh, I missed.
/bin/sh
shebang was enabled.
set -x
in script, and result,
...snip...
stat: cannot read file system information for ‘%u’: No such file or directory
+ VEEWEE_UID=' File: "/Users/zchee/src/github.com"
ID: 100000400000011 Namelen: * Type: hfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 121837600 Free: 36911599 Available: 36847599
Inodes: Total: 121837598 Free: 36847599'
+ cleanup
+ hdiutil detach -quiet -force ''
+ echo
+ hdiutil detach -quiet -force ''
+ echo
+ rm -rf '' '' '' ''
This problem caused by stat
command flag difference of OS X default and GNU coreutils.
Not zsh
. Sorry.
Thanks for clarifying - still a good idea to use absolute paths for UNIX utils that differ from GNU versions. Merging!
I as much as possible to follow to Linux (also GNU), I have installed
coreutils
with--with-default-names
in Homebrew. Also,stat
is shell built-in command ofzsh
.If using the stat of coreutils or zsh,
that error will occur.
So, it was changed
stat
command path to an absolute path.What do you think?