Scripts version 1034

This commit is contained in:
castro-fidel
2021-04-15 23:51:10 +03:00
parent 70a4b8da4d
commit 56c3da7d16
25 changed files with 510 additions and 330 deletions

View File

@ -15,13 +15,29 @@ export gamename="Proton"
export portname="PortProton"
export port_ver=XX
########################################################################
export PW_FTP_URL="https://portwine-linux.ru/ftp"
export INSTALLING_PORT=1
export PROGS_INST=""
export vexit=0
export minimum_ldd_ver="2.28"
########################################################################
export local_script_hash=$(sha256sum "$0" | awk '{print $1}')
export remote_script_hash=`curl -s --list-only "${PW_FTP_URL}/portwine/${portname}-${port_ver}.sha256sum" | awk '{print $1}'`
if [ "${local_script_hash}" != "${remote_script_hash}" ] ; then
echo "\033[31mHash sum does not match, please download the ${portname}-${port_ver} again.\033[0m"
zenity --error --no-wrap --text "Hash sum does not match, please download the ${portname}-${port_ver} again." 2> /dev/null
exit 1
fi
export system_ldd_ver=`ldd --version | grep -m1 ldd | awk '{print $NF}'`
if [ `echo ${system_ldd_ver} | tr -d .` -lt `echo ${minimum_ldd_ver} | tr -d .` ] ; then
echo "\033[31mYour system doesn\`t support ${portname}.\nGlibc version required >= ${minimum_ldd_ver}\nGlibc in your system = ${system_ldd_ver}\033[0m"
zenity --error --no-wrap --text "Your system doesn\`t support ${portname}.\nGlibc version required >= ${minimum_ldd_ver}\nGlibc in your system = ${system_ldd_ver}" 2> /dev/null
exit 1
fi
for PROGS in "wget" "curl" "tar"
do
if [ ! -x "`which "${PROGS}" 2>/dev/null`" ] ; then
PROGS_INST="${PROGS_INST} ${PROGS}"
vexit=1
PROGS_INST="${PROGS_INST} ${PROGS}" && vexit=1
fi
done
if [ "${vexit}" -eq "1" ] ; then
@ -140,7 +156,7 @@ read "update_loc" < "${PORT_WINE_TMP_PATH}/${portname}_loc"
export update_loc=${update_loc}
########################################################################
cd "${PORT_WINE_PATH}"
tail -n +162 "${links}/${setup_script}" > "${PORT_WINE_PATH}/${ARCH_NAME}"
tail -n +178 "${links}/${setup_script}" > "${PORT_WINE_PATH}/${ARCH_NAME}"
if [ "${s_install}" = "1" ] ; then
tar -Jxvf "${PORT_WINE_PATH}/${ARCH_NAME}" -C "${PORT_WINE_PATH}/"
else
@ -148,7 +164,7 @@ else
fi
chmod 755 -R "${PORT_WINE_PATH}"
mv -f "${PORT_WINE_PATH}/${ARCH_NAME}" "${PORT_WINE_PATH}/data/tmp"
sed -n 1,161p "${links}/${setup_script}" > "${PORT_WINE_PATH}/data/tmp/${setup_script}"
sed -n 1,177p "${links}/${setup_script}" > "${PORT_WINE_PATH}/data/tmp/${setup_script}"
########################################################################
if [ -d "${PORT_PFX}_old" ] ; then
rm -fR "${PORT_PFX}"