Commit 2bd3ad04 authored by Mikhail Tergoev's avatar Mikhail Tergoev

Merge branch 'use-tmpfs' of github.com:Htylol/PortWINE into Htylol-use-tmpfs

parents 28da36d0 c049535a
...@@ -153,7 +153,7 @@ export USER_CONF="${PORT_WINE_PATH}/data/user.conf" ...@@ -153,7 +153,7 @@ export USER_CONF="${PORT_WINE_PATH}/data/user.conf"
check_user_conf check_user_conf
check_variables PW_LOG "0" check_variables PW_LOG "0"
try_remove_file "${PORT_WINE_TMP_PATH}/update_pfx_log" try_remove_file "${PW_TMPFS_PATH}/update_pfx_log"
# shellcheck source=/dev/null # shellcheck source=/dev/null
source "${USER_CONF}" source "${USER_CONF}"
...@@ -312,20 +312,20 @@ if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then ...@@ -312,20 +312,20 @@ if [[ ! -z $(basename "${portwine_exe}" | grep .ppack) ]] ; then
else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\"" else TMP_ALL_PATH="LD_LIBRARY_PATH=\"${PW_LD_LIBRARY_PATH}\""
fi fi
PW_PREFIX_NAME=$(basename "$1" | awk -F'.' '{print $1}') PW_PREFIX_NAME=$(basename "$1" | awk -F'.' '{print $1}')
cat << EOF > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh cat << EOF > "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh
#!/usr/bin/env bash #!/usr/bin/env bash
${TMP_ALL_PATH} unsquashfs -f -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "$1" \ ${TMP_ALL_PATH} unsquashfs -f -d "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}" "$1" \
|| echo "ERROR" > "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error || echo "ERROR" > "${PW_TMPFS_PATH}"/pp_pfx_unpack_error
EOF EOF
chmod u+x "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh chmod u+x "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh
${pw_runtime} ${PW_TERM} "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh ${pw_runtime} ${PW_TERM} "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh
if grep "ERROR" "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error &>/dev/null ; then if grep "ERROR" "${PW_TMPFS_PATH}"/pp_pfx_unpack_error &>/dev/null ; then
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack_error try_remove_file "${PW_TMPFS_PATH}"/pp_pfx_unpack_error
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh try_remove_file "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh
yad_error "$(gettext "Unpack has FAILED for prefix:") <b>\"${PW_PREFIX_NAME}\"</b>." yad_error "$(gettext "Unpack has FAILED for prefix:") <b>\"${PW_PREFIX_NAME}\"</b>."
exit 1 exit 1
else else
try_remove_file "${PORT_WINE_TMP_PATH}"/pp_pfx_unpack.sh try_remove_file "${PW_TMPFS_PATH}"/pp_pfx_unpack.sh
if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" ]] ; then if [[ -f "${PORT_WINE_PATH}/data/prefixes/${PW_PREFIX_NAME}/.create_shortcut" ]] ; then
while IFS= read -r line while IFS= read -r line
do do
......
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