I have a directory named bin that has a file called build-code, file type is displayed as "file".
When opened with notepad, the code looks like this:
#!/usr/bin/env bash
set -e
rm -rf build
mkdir build
cp jspm_packages/system.src.js build/system.src.js
cp jspm_packages/system-polyfills.src.js build/system-polyfills.src.js
./bin/build-root
./bin/build-common-deps
./bin/build-home
./bin/build-navbar
./bin/build-angular1
./bin/build-react -p
./bin/build-angular2
./bin/build-vue
./bin/build-svelte
./bin/build-preact
./bin/build-vanillajs
When I try to run this file by navigating to bin and typing in build-code, I get the following error (PowerShell):
'.\bin\build-code' is not recognized as an internal or external command, operable program or batch file.
And bash:
$ build-code
bash: build-code: command not found
I have tried this in both PowerShell and GitBash. I have virtually no experience with writing scrupts for either (this is third-party code). What gives? Is this an invalid script, or am I doing something wrong?
As a side note, what is set -e doing? Seems to be setting some var, but I have no idea why.
P.S. npm tag is on the list, because this was initially being called from npm, but I am trying manually now.
set -ewill cause the script to exit if any command exits with a code other than 0. It's setting a bash option, not a variable./build-codein bash