pkg(common): helpers extract into directories

This commit is contained in:
Thomas Hobson 2021-02-28 01:39:19 +13:00
parent bd920b19b9
commit a27638b06b
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
1 changed files with 7 additions and 3 deletions

View File

@ -65,9 +65,13 @@ $(patsubst %.json,%.jq,${INFO_FILE}):
# Helpers
%/: %.tar.gz
cd ${BUILD_DIR} && tar xzf $(patsubst ${BUILD_DIR}%,%,$<)
mkdir -p $@
tar xzf $< --strip-components=1 -C $@
%/: %.tar.xz
cd ${BUILD_DIR} && tar xf $(patsubst ${BUILD_DIR}%,%,$<)
mkdir -p $@
tar xf $< --strip-components=1 -C $@
%/: %.zip
mkdir -p $@
unzip $< -d $@
%.json: %.jq
jq '$(shell tr '\n' '|' < $<).' <<< "{}" > $@