Changeset 1216 for branches/sandbox/gsascmds.tcl
- Timestamp:
- Aug 19, 2012 9:10:44 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/gsascmds.tcl
r1215 r1216 3790 3790 3791 3791 proc CheckAndDoUpdate { } { 3792 if [file exists [file join $::expgui(gsasdir) proxyinfo.txt]] { 3793 set fp [open [file join $::expgui(gsasdir) proxyinfo.txt]] 3794 gets $fp proxaddr 3795 gets $fp proxport 3796 set proxy "--config-option servers:global:http-proxy-host=$proxaddr" 3797 set proxp "--config-option servers:global:http-proxy-port=$proxport" 3798 close $fp 3799 } else { 3800 set proxy {} 3801 set proxp {} 3802 } 3792 3803 pleasewait "... Checking with software repository..." 3793 3804 if {! [CheckSVNinstalled]} { … … 3808 3819 # check for updates 3809 3820 set SVN [auto_execok svn] 3810 if [catch {set res [eval exec $SVN status [list $::expgui(gsasdir)] -u]} err] { 3821 if [catch {set res \ 3822 [eval exec $SVN status [list $::expgui(gsasdir)] -u $proxy $proxp] \ 3823 } err] { 3811 3824 donewait 3812 3825 set ans [MyMessageBox -parent . -title "Error checking status" \ … … 3815 3828 if {$ans != "no"} { 3816 3829 forknewterm "manually update in subversion" \ 3817 " $SVN update [file normalize $::expgui(gsasdir)]"3830 " \"$SVN update [file normalize $::expgui(gsasdir)] $proxy $proxp\"" 3818 3831 forknewterm "manually update in subversion" \ 3819 " $SVN update [file normalize $::expgui(scriptdir)]"3832 " \"$SVN update [file normalize $::expgui(scriptdir)] $proxy $proxp\"" 3820 3833 } 3821 3834 return 3822 3835 } else { 3823 3836 if {[string first "*" $res] == -1} { 3824 catch {set res [eval exec $SVN status [list $::expgui(scriptdir)] -u]} err 3837 catch {set res \ 3838 [eval exec $SVN status [list $::expgui(scriptdir)] -u $proxy $proxp]\ 3839 } err 3825 3840 } 3826 3841 if {[string first "*" $res] == -1} { … … 3832 3847 } 3833 3848 } 3834 3849 set msg { 3850 Updates to GSAS/EXPGUI found on server. 3851 3852 Press the "Update & Restart" button to begin the update process. After the update completes, EXPGUI will be restarted.} 3853 if {$proxy != "" || $proxp != ""} { 3854 append msg "\nUsing proxy settings \"$proxy\" and \"$proxp\"" 3855 } 3835 3856 donewait 3836 3857 if {[MyMessageBox -parent . -title "Ready to Update" \ 3837 -message { 3838 Updates to GSAS/EXPGUI found on server. 3839 3840 Press the "Update & Restart" button to begin the update process. After the update completes, EXPGUI will be restarted.} \ 3858 -message $msg \ 3841 3859 -type {Cancel "Update & Restart"} -default cancel -icon warning 3842 3860 ] == "cancel"} {return} … … 3855 3873 @pause 3856 3874 .\svn\bin\svn cleanup . 3857 .\svn\bin\svn update . 3858 } 3875 } 3876 puts $fp ".\\svn\\bin\\svn update . $proxy $proxp" 3859 3877 puts $fp ".\\svn\\bin\\svn cleanup $::expgui(scriptdir)" 3860 puts $fp ".\\svn\\bin\\svn update $::expgui(scriptdir) "3878 puts $fp ".\\svn\\bin\\svn update $::expgui(scriptdir) $proxy $proxp" 3861 3879 puts $fp {@if (%1)==() goto Install2 3862 3880 @echo **************************************************** … … 3896 3914 -icon error 3897 3915 } 3898 if [catch {set res [exec $SVN up $::expgui(gsasdir) ]} err] {3916 if [catch {set res [exec $SVN up $::expgui(gsasdir) $proxy $proxp]} err] { 3899 3917 MyMessageBox -parent . -title "Error updating" \ 3900 3918 -message "Error performing update:\n$err" \ 3901 3919 -icon error 3902 3920 return 3903 } elseif [catch {set res [exec $SVN up $::expgui(scriptdir) ]} err] {3921 } elseif [catch {set res [exec $SVN up $::expgui(scriptdir) $proxy $proxp]} err] { 3904 3922 MyMessageBox -parent . -title "Error updating" \ 3905 3923 -message "Error performing scriptdir update:\n$err" \
Note: See TracChangeset
for help on using the changeset viewer.