Browse Source

When relaunching to update with sudo, always pass -d

Fixes issue 3958

Change-Id: Iaedb281b12cb82e9bc2023b36bb2c3faa924bb30
Reviewed-on: http://gerrit.dmdirc.com/1077
Automatic-Compile: DMDirc Local Commits <dmdirc@googlemail.com>
Reviewed-by: Chris Smith <chris@dmdirc.com>
tags/0.6.4rc1
Shane Mc Cormack 14 years ago
parent
commit
21efd7f341
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      launcher/unix/DMDirc.sh

+ 6
- 6
launcher/unix/DMDirc.sh View File

23
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
 # SOFTWARE.
24
 # SOFTWARE.
25
 
25
 
26
-LAUNCHERVERSION="16"
26
+LAUNCHERVERSION="17"
27
 LAUNCHERINFO="unix-${LAUNCHERVERSION}"
27
 LAUNCHERINFO="unix-${LAUNCHERVERSION}"
28
 
28
 
29
 params=""
29
 params=""
362
 				if [ $? -eq 0 ]; then
362
 				if [ $? -eq 0 ]; then
363
 					echo "Password dialog on display"
363
 					echo "Password dialog on display"
364
 					# osascript -e "do shell script \"mv -fv \\\"${profiledir}/.DMDirc.jar\\\" \\\"${jar}\\\"\" with administrator privileges"
364
 					# osascript -e "do shell script \"mv -fv \\\"${profiledir}/.DMDirc.jar\\\" \\\"${jar}\\\"\" with administrator privileges"
365
-					osascript -e "do shell script \"sh ${0} ${params} --updateonly\" with administrator privileges"
365
+					osascript -e "do shell script \"sh ${0} ${params} -d "${profiledir}" --updateonly\" with administrator privileges"
366
 				fi;
366
 				fi;
367
 			else
367
 			else
368
 				if [ "" != "${ISKDE}" -a "" != "${KSUDO}" -a "" != "${DISPLAY}" ]; then
368
 				if [ "" != "${ISKDE}" -a "" != "${KSUDO}" -a "" != "${DISPLAY}" ]; then
369
 					echo "Password dialog on ${DISPLAY}"
369
 					echo "Password dialog on ${DISPLAY}"
370
 					# ${KSUDO} --comment "DMDirc Client Updater requires root access to modify the global installation" -- mv -fv "${profiledir}/.DMDirc.jar" "${jar}"
370
 					# ${KSUDO} --comment "DMDirc Client Updater requires root access to modify the global installation" -- mv -fv "${profiledir}/.DMDirc.jar" "${jar}"
371
-					${KSUDO} --comment "DMDirc Client Updater requires root access to modify the global installation" -- sh ${0} ${params} --updateonly
371
+					${KSUDO} --comment "DMDirc Client Updater requires root access to modify the global installation" -- sh ${0} ${params} -d "${profiledir}" --updateonly
372
 				elif [ "" != "${ISGNOME}" -a "" != "${GSUDO}" -a "" != "${DISPLAY}" ]; then
372
 				elif [ "" != "${ISGNOME}" -a "" != "${GSUDO}" -a "" != "${DISPLAY}" ]; then
373
 					echo "Password dialog on ${DISPLAY}"
373
 					echo "Password dialog on ${DISPLAY}"
374
 					# ${GSUDO} -k --message "DMDirc Client Updater requires root access to modify the global installation" -- mv -fv "${profiledir}/.DMDirc.jar" "${jar}"
374
 					# ${GSUDO} -k --message "DMDirc Client Updater requires root access to modify the global installation" -- mv -fv "${profiledir}/.DMDirc.jar" "${jar}"
375
-					${GSUDO} -k --message "DMDirc Client Updater requires root access to modify the global installation" -- sh ${0} ${params} --updateonly
375
+					${GSUDO} -k --message "DMDirc Client Updater requires root access to modify the global installation" -- sh ${0} ${params} -d "${profiledir}" --updateonly
376
 				elif [ "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then	
376
 				elif [ "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then	
377
 					sudo -k
377
 					sudo -k
378
-					${ZENITY} --entry --title="DMDirc" --text="DMDirc Client Updater requires root access to modify the global installation, please enter your password to continue." --entry-text="" --hide-text | sudo -S -- sh ${0} ${params} --updateonly
378
+					${ZENITY} --entry --title="DMDirc" --text="DMDirc Client Updater requires root access to modify the global installation, please enter your password to continue." --entry-text="" --hide-text | sudo -S -- sh ${0} ${params} -d "${profiledir}" --updateonly
379
 				else
379
 				else
380
 					echo "DMDirc Client Updater requires root access to modify the global installation"
380
 					echo "DMDirc Client Updater requires root access to modify the global installation"
381
 					# sudo mv -fv "${profiledir}/.DMDirc.jar" "${jar}"
381
 					# sudo mv -fv "${profiledir}/.DMDirc.jar" "${jar}"
382
-					sudo sh ${0} ${params} --updateonly
382
+					sudo sh ${0} ${params} -d "${profiledir}" --updateonly
383
 				fi;
383
 				fi;
384
 			fi;
384
 			fi;
385
 		elif [ "${UPDATEONLY}" = "1" ]; then
385
 		elif [ "${UPDATEONLY}" = "1" ]; then

Loading…
Cancel
Save