我正在Mac上制作NW.js应用程序,并希望通过双击图标以开发模式运行应用程序.第一步,我正在尝试使我的shell脚本工作.
在Windows上使用VSCode(我想获得时间),我run-nw在项目的根目录创建了一个文件,其中包含:
#!/bin/bash
cd "src"
npm install
cd ..
./tools/nwjs-sdk-v0.17.3-osx-x64/nwjs.app/Contents/MacOS/nwjs "src" &
Run Code Online (Sandbox Code Playgroud)
但我得到这个输出:
$ sh ./run-nw
: command not found
: No such file or directory
: command not found
: No such file or directory
Usage: npm <command>
where <command> is one of: (snip commands list)
(snip npm help)
npm@3.10.3 /usr/local/lib/node_modules/npm
: command not found
: No such file or directory
: command not found
Run Code Online (Sandbox Code Playgroud)
我真的不明白:
\r\n用\n(以防\r造成了问题),但它改变不了什么.dirname指令),或者它可能不知道cd …我正在尝试将我的Heroku备份下载到文件夹中.
下载到这样的当前文件夹工作:
curl -o latest.dump `heroku pg:backups public-url`
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试添加一个folders路径时,latest.dump它看起来像这样:
$ curl -o /db-bkups/latest.dump `heroku pg:backups public-url`
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 44318 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0Warning: Failed to create the file
Warning: /db-bkups/latest.dump: No such file
Warning: or directory
36 44318 36 16384 0 0 9626 0 0:00:04 0:00:01 0:00:03 9626
curl: (23) Failed writing body …Run Code Online (Sandbox Code Playgroud)