Skip to content
This repository was archived by the owner on Sep 17, 2022. It is now read-only.
This repository was archived by the owner on Sep 17, 2022. It is now read-only.

Bad substitution from utils/get-value.sh invokation in Makefile (Ubuntu Linux) #10

Description

@turbomam

When running make setup

After successful mkdir -p src/mam-lpt1/datamodel:

./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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions