Files
django-test/.buildbot/undist/01-unpack.sh
2019-10-10 16:23:18 +02:00

24 lines
402 B
Bash

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"
set -- --strip-components=1 -C "$INSTALL_DIR"
fi
case "$DIST_FORMAT" in
gztar)
tar -xzf "$DIST_FILE" $*
;;
*)
echo "Unsupported DIST_FORMAT ($DIST_FORMAT)" >&2
exit 1
;;
esac