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
$'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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.