From fd15441dfe5e93cf07046e7c7bcedcf2d367df00 Mon Sep 17 00:00:00 2001 From: mollusk Date: Thu, 22 Aug 2019 07:53:35 -0700 Subject: [PATCH] parlink.sh: set driver with args Former-commit-id: ee3acc4d63fd630009353ddbc58de7b8eb9182be --- parlink.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/parlink.sh b/parlink.sh index f85d766..b78914e 100755 --- a/parlink.sh +++ b/parlink.sh @@ -5,14 +5,20 @@ PARSEC_BIN="/usr/bin/parsecd" PARSEC_ARGS="app_daemon=1" PARSEC_URL="https://parsecgaming.com" PARSEC_PROCESS=$(ps -A | grep -c parsecd) +CARD_ID="$1" + +if [ ! -z ${CARD_ID} ];then + echo "Setting LIBVA_DRIVER_NAME to: ${CARD_ID}" + export LIBVA_DRIVER_NAME=${CARD_ID} +fi while [ ${PARSEC_PROCESS} != "1" ];do -if [ ! -f ${PARSEC_BIN} ];then - xdg-open ${PARSEC_URL} -elif [ ${PARSEC_PROCESS} = "1" ];then - ${PARSEC_BIN} ${PARSEC_ARGS} + if [ ! -f ${PARSEC_BIN} ];then + xdg-open ${PARSEC_URL} + elif [ ${PARSEC_PROCESS} = "1" ];then + ${PARSEC_BIN} ${PARSEC_ARGS} -else - ${PARSEC_BIN} ${PARSEC_ARGS} -fi + else + ${PARSEC_BIN} ${PARSEC_ARGS} + fi done