Commit 2059be83 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: move unigine-heaven unpack to pack.d

parent d4dfe9c3
#!/bin/sh
TAR="$1"
#VERSION="$2"
RETURNTARNAME="$2"
OPKGNAME="Unigine_Heaven"
. $(dirname $0)/common.sh
# args: <run file> <output tar>
convert_makeself_to_tar()
{
offset=`head -n 403 "$1" | wc -c | tr -d " "`
dd if="$1" ibs=$offset skip=1 obs=1024 conv=sync | gzip -cd > "$2"
}
BASENAME="$(basename $(echo $OPKGNAME*.run | tr "[A-Z_]" "[a-z-]") .run)"
convert_makeself_to_tar $TAR $BASENAME.tar
return_tar $BASENAME.tar
......@@ -6,21 +6,11 @@ DESCRIPTION="Unigine Heaven 2009 (Unigine Benchmark) from the official site"
. $(dirname $0)/common.sh
convert_makeself_to_tar()
{
offset=`head -n 403 "$1" | wc -c | tr -d " "`
dd if="$1" ibs=$offset skip=1 obs=1024 conv=sync | gzip -cd > "$(basename "$1" .run).tar"
}
PKGDIR=$(mktemp -d)
trap "rm -fr $PKGDIR" EXIT
cd $PKGDIR || fatal
# https://assets.unigine.com/d/Unigine_Heaven-4.0.run
epm tool eget --latest https://benchmark.unigine.com/heaven "Unigine_Heaven*.run"
mv Unigine_Heaven*.run $(echo Unigine_Heaven*.run | tr "[A-Z_]" "[a-z-]")
convert_makeself_to_tar $PKGNAME*.run
epm install $PKGNAME*.tar
epm pack --install $PKGNAME Unigine_Heaven*.run
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment