mkimage.sh: also handle json file as source
This commit is contained in:
parent
bb548a3d90
commit
090dd46a8e
|
@ -70,6 +70,10 @@ done
|
||||||
SOURCE=$(readlink -e "$1")
|
SOURCE=$(readlink -e "$1")
|
||||||
IMAGE=$(readlink -f "$2")
|
IMAGE=$(readlink -f "$2")
|
||||||
|
|
||||||
|
if ! [[ -d $SOURCE ]]; then
|
||||||
|
SOURCE="${SOURCE%/*}/$(jq -r '.name' "$SOURCE")-$(jq -r '.version' "$SOURCE")"
|
||||||
|
fi
|
||||||
|
|
||||||
if ! [[ -d $SOURCE ]] || ! [[ $IMAGE ]]; then
|
if ! [[ -d $SOURCE ]] || ! [[ $IMAGE ]]; then
|
||||||
usage
|
usage
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in a new issue