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,7 +23,7 @@
23 23
 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24 24
 # SOFTWARE.
25 25
 
26
-LAUNCHERVERSION="16"
26
+LAUNCHERVERSION="17"
27 27
 LAUNCHERINFO="unix-${LAUNCHERVERSION}"
28 28
 
29 29
 params=""
@@ -362,24 +362,24 @@ if [ -e "${UPDATESOURCE}" ]; then
362 362
 				if [ $? -eq 0 ]; then
363 363
 					echo "Password dialog on display"
364 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 366
 				fi;
367 367
 			else
368 368
 				if [ "" != "${ISKDE}" -a "" != "${KSUDO}" -a "" != "${DISPLAY}" ]; then
369 369
 					echo "Password dialog on ${DISPLAY}"
370 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 372
 				elif [ "" != "${ISGNOME}" -a "" != "${GSUDO}" -a "" != "${DISPLAY}" ]; then
373 373
 					echo "Password dialog on ${DISPLAY}"
374 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 376
 				elif [ "" != "${ZENITY}" -a "" != "${DISPLAY}" ]; then	
377 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 379
 				else
380 380
 					echo "DMDirc Client Updater requires root access to modify the global installation"
381 381
 					# sudo mv -fv "${profiledir}/.DMDirc.jar" "${jar}"
382
-					sudo sh ${0} ${params} --updateonly
382
+					sudo sh ${0} ${params} -d "${profiledir}" --updateonly
383 383
 				fi;
384 384
 			fi;
385 385
 		elif [ "${UPDATEONLY}" = "1" ]; then

Loading…
Cancel
Save