You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.
./utils/get-value.sh: 4: Bad substitution
./utils/get-value.sh: 4: Bad substitution
Research into utils/get-value.sh
#!/bin/sh# get the value of a key in the about.yaml file# https://stackoverflow.com/questions/1221833/pipe-output-and-capture-exit-status-in-bash
grep $1 about.yaml | sed "s/$1:[[:space:]]//";test${PIPESTATUS[0]} -eq 0
Invoked in Makefile as
SCHEMA_NAME = $(shell sh ./utils/get-value.sh name)SOURCE_SCHEMA_PATH = $(shell sh ./utils/get-value.sh source_schema_path)
Those commands do run for me in isolation, as long as I source them
. ./utils/get-value.sh name
mam-lpt1
. ./utils/get-value.sh source_schema_path
src/linkml/mam_lpt1.yaml
but not if I treat ./utils/get-value.sh like an executable
./utils/get-value.sh name
bash: ./utils/get-value.sh: Permission denied
The text was updated successfully, but these errors were encountered:
This happens because sh and /bin/sh in Ubuntu (and Debian) are dash rather than bash. $PIPESTATUS is bash-specific, so the script (and the Makefile that calls it) should specific bash when bash is needed. #16 would address this.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When running
make setup
After successful
mkdir -p src/mam-lpt1/datamodel
:Research into
utils/get-value.sh
Invoked in Makefile as
Those commands do run for me in isolation, as long as I source them
. ./utils/get-value.sh name
. ./utils/get-value.sh source_schema_path
but not if I treat
./utils/get-value.sh
like an executable./utils/get-value.sh name
The text was updated successfully, but these errors were encountered: