安装包时 Cygwin 的 "source" 命令失败

Cygwin's "source" command fails when installing package

我正在使用 cygwin 从这个网站 Windows 上编译源代码

https://github.com/davidstutz/extended-berkeley-segmentation-benchmark/tree/master/source

To compile the benchmarking software from source code, run:

   source build.sh

This script should compile the correspondPixels mex file and copy it into the 
../benchmarks/ directory.

但是我输入的以下命令不起作用。我在文件夹目录下。

$ source build.sh
-bash: build.sh: No such file or directory

$ ./source build.sh
-bash: ./source: Is a directory

$ ls
asa.mat     others               relabel.m            tests
benchmarks  plot_benchmarks.asv  source               use.mat
data        plot_benchmarks.m    test_benchmarks.asv
LICENSE.md  README.md            test_benchmarks.m

这是我第一次使用 Cygwin,所以命令对我来说是新的。

build.sh 文件在 source 目录中。

$ cd source
$ source build.sh

(不要将目录名 source 与 shell 的内置命令 source 混淆。)

你也可以使用. build.sh而不是source build.sh. 命令等同于 source,可能更传统一些。