Added script referenced by gog eclass
This commit is contained in:
parent
3c898e6751
commit
68da7f9f5b
24
games-util/lgogdownloader/files/export_gog_to_portage
Normal file
24
games-util/lgogdownloader/files/export_gog_to_portage
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
function stringify_dir {
|
||||||
|
tar -c "$1" | xz -z9evc 2>/dev/null | base64 | tr -d '\n' | sed 's/$/\n/'
|
||||||
|
}
|
||||||
|
|
||||||
|
pushd ~ >/dev/null
|
||||||
|
BACKUP=""
|
||||||
|
GOG_CONF_DIR=".config/lgogdownloader"
|
||||||
|
if [ -d ${GOG_CONF_DIR} ]; then
|
||||||
|
BACKUP=$(stringify_dir "${GOG_CONF_DIR}")
|
||||||
|
fi
|
||||||
|
rm -rf "${GOG_CONF_DIR}"
|
||||||
|
lgogdownloader --login
|
||||||
|
OUTPUT=$(stringify_dir "${GOG_CONF_DIR}")
|
||||||
|
rm -rf "${GOG_CONF_DIR}"
|
||||||
|
if [ "${BACKUP}" != "" ]; then
|
||||||
|
echo "${BACKUP}" | base64 -d | tar -Jxf - -C ~
|
||||||
|
fi
|
||||||
|
popd >/dev/null
|
||||||
|
|
||||||
|
echo "Your GOG_CONFIG:"
|
||||||
|
echo "${OUTPUT}"
|
@ -19,7 +19,13 @@ RDEPEND=">=app-crypt/rhash-1.3.3-r2:0=
|
|||||||
>=dev-libs/jsoncpp-1.7:0=
|
>=dev-libs/jsoncpp-1.7:0=
|
||||||
dev-libs/tinyxml2:0=
|
dev-libs/tinyxml2:0=
|
||||||
>=net-misc/curl-7.32:0=[ssl]
|
>=net-misc/curl-7.32:0=[ssl]
|
||||||
gui? ( dev-qt/qtwebengine:5=[widgets] )"
|
gui? ( dev-qt/qtwebengine:5=[widgets] )
|
||||||
|
portage? ( app-shells/bash
|
||||||
|
sys-apps/coreutils
|
||||||
|
app-arch/xz-utils
|
||||||
|
app-arch/tar
|
||||||
|
sys-apps/sed
|
||||||
|
)"
|
||||||
|
|
||||||
DEPEND="${RDEPEND}"
|
DEPEND="${RDEPEND}"
|
||||||
|
|
||||||
@ -39,4 +45,7 @@ src_configure() {
|
|||||||
src_install() {
|
src_install() {
|
||||||
cmake_src_install
|
cmake_src_install
|
||||||
gunzip "${ED}"/usr/share/man/man1/${PN}.1.gz || die
|
gunzip "${ED}"/usr/share/man/man1/${PN}.1.gz || die
|
||||||
|
if use portage; then
|
||||||
|
dobin ${FILESDIR}/export_gog_to_portage
|
||||||
|
fi
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user