From 2bde8b98f720a271fdd4649ee14c5d626f488bdd Mon Sep 17 00:00:00 2001 From: Vladimir Vukicevic Date: Sun, 19 Apr 2020 11:16:08 -0700 Subject: [PATCH] fix tar_from_installation.sh and dist target --- .gitignore | 1 + Makefile | 2 +- tar_from_installation.sh | 14 +++++++++----- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 378eac2..9d0b71a 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ build +dist diff --git a/Makefile b/Makefile index 903c02a..6f30824 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,7 @@ package: build/package.BUILT build/package.BUILT: build strip mkdir -p dist command -v dpkg-deb >/dev/null && ./deb_from_installation.sh $(shell pwd)/dist || true - ./tar_from_installation.sh $(shell pwd)/dist + ./tar_from_installation.sh "$(shell pwd)/dist" "$(VERSION)" "$(PATH_PREFIX)" touch build/package.BUILT .PHONY: default clean build strip package check diff --git a/tar_from_installation.sh b/tar_from_installation.sh index 2ac2179..e5f2e1b 100755 --- a/tar_from_installation.sh +++ b/tar_from_installation.sh @@ -1,15 +1,19 @@ #!/usr/bin/env bash set -ex +OUTDIR=$PWD/dist +VERSION=`./version.sh` +INDIR=/opt/wasi-sdk + if [ -n "$1" ]; then OUTDIR=$1 -else - OUTDIR=$PWD/dist fi if [ -n "$2" ]; then VERSION="$2" -else - VERSION=`./version.sh` +fi + +if [ -n "$3" ]; then + INDIR="$3" fi PKGDIR=build/wasi-sdk-$VERSION @@ -23,7 +27,7 @@ case "$(uname -s)" in esac rm -rf $PKGDIR -cp -R /opt/wasi-sdk $PKGDIR +cp -R $INDIR $PKGDIR cd build tar czf $OUTDIR/wasi-sdk-$VERSION\-$MACHINE.tar.gz wasi-sdk-$VERSION