Reputation: 2499
I have a script as below:
# /brickos/util/f.sh
set folder=`pwd`
cd /brickos/boot
make
firmdl3 -f brickOS.srec
cd $folder
when I run it in cygwin(minty.exe), I got error as below, but when I run them in terminal directly, no any errors! what can I do?
$ f.sh
/cygdrive/c/cygwin/brickos/util/f.sh: line 2: cd: /brickos/boot
: No such file or directory
/cygdrive/c/cygwin/brickos/util/f.sh: line 3: $'make\r': command not found
firmdl3: ERROR- failed to open brickOS.srec
/cygdrive/c/cygwin/brickos/util/f.sh: line 5: cd:
: No such file or directory
Upvotes: 0
Views: 1743
Reputation: 122414
$'make\r': command not found
suggests the script is saved with Windows (CRLF) instead of Unix style (just LF) line endings. Try converting it to Unix format and see if that improves matters.
Upvotes: 3