forked from CastroFidel/PortWINE
update post-install script 2
This commit is contained in:
parent
0c50d3df93
commit
ab837e46e0
@ -35,10 +35,12 @@ if [ "${PW_SILENT_INSTALL}" = "1" ] ; then
|
|||||||
unset INSTALLING_PORT
|
unset INSTALLING_PORT
|
||||||
if [[ -f "${HOME}/.local/share/applications/PortProton.desktop" ]] ; then
|
if [[ -f "${HOME}/.local/share/applications/PortProton.desktop" ]] ; then
|
||||||
export PW_OLD_PATH=`cat "${HOME}/.local/share/applications/PortProton.desktop" | grep -w 'Path=' | sed -E 's/Path=//' | sed -E 's%\/PortProton\/data\/scripts\/%%g' `
|
export PW_OLD_PATH=`cat "${HOME}/.local/share/applications/PortProton.desktop" | grep -w 'Path=' | sed -E 's/Path=//' | sed -E 's%\/PortProton\/data\/scripts\/%%g' `
|
||||||
|
echo "PW_OLD_PATH=${PW_OLD_PATH}"
|
||||||
try_remove_file "${HOME}/.local/share/applications/PortProton.desktop"
|
try_remove_file "${HOME}/.local/share/applications/PortProton.desktop"
|
||||||
fi
|
fi
|
||||||
if [[ ! -z "${PW_OLD_PATH}" ]] ; then
|
if [[ ! -z "${PW_OLD_PATH}" ]] ; then
|
||||||
if [[ "${PW_OLD_PATH}"* == "${HOME}/PortWINE"* ]] & [[ -d "${HOME}/PortWINE" ]] ; then
|
if [[ "${PW_OLD_PATH}"* == "${HOME}/PortWINE"* ]] & [[ -d "${HOME}/PortWINE" ]] ; then
|
||||||
|
echo "Old path = ${HOME}/PortWINE"
|
||||||
mv -f "${HOME}/PortWINE" "${XDG_DATA_HOME}"
|
mv -f "${HOME}/PortWINE" "${XDG_DATA_HOME}"
|
||||||
elif [[ "${PW_OLD_PATH}"* == "${PW_OLD_PATH}/PortWINE"* ]] & [[ -d "${PW_OLD_PATH}/PortWINE" ]] ; then
|
elif [[ "${PW_OLD_PATH}"* == "${PW_OLD_PATH}/PortWINE"* ]] & [[ -d "${PW_OLD_PATH}/PortWINE" ]] ; then
|
||||||
ln -s "${PW_OLD_PATH}/PortWINE" "${XDG_DATA_HOME}/"
|
ln -s "${PW_OLD_PATH}/PortWINE" "${XDG_DATA_HOME}/"
|
||||||
|
Loading…
Reference in New Issue
Block a user