This commit is contained in:
2019-10-10 13:18:05 +02:00
parent 1493c02b6e
commit b5ca6ad0a3
2 changed files with 23 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
if test -z "$DIST_FORMAT" ; then
DIST_FORMAT="gztar"
fi
if test -z "$DIST_FILE" ; then
echo "Environment variable DIST_FILE must not be empty" >&2
exit 1
fi
if test -n "$INSTALL_DIR" ; then
mkdir -p "$INSTALL_DIR"
tar_opts="--strip-components=1 -C \"$INSTALL_DIR\""
fi
case "$DIST_FORMAT" in
gztar)
tar -xzf "$DIST_FILE" $tar_opts
;;
*)
echo "Unsupported DIST_FORMAT ($DIST_FORMAT)" >&2
exit 1
;;
esac