Changeset 1167 for branches/sandbox/gsascmds.tcl
- Timestamp:
- Aug 18, 2011 3:06:58 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/sandbox/gsascmds.tcl
r1122 r1167 3801 3801 forknewterm "manually update in subversion" \ 3802 3802 "$SVN update [file normalize $::expgui(gsasdir)]" 3803 forknewterm "manually update in subversion" \ 3804 "$SVN update [file normalize $::expgui(scriptdir)]" 3803 3805 } 3804 3806 return 3805 3807 } else { 3808 if {[string first "*" $res] == -1} { 3809 catch {set res [eval exec $SVN status [list $::expgui(scriptdir)] -u]} err 3810 } 3806 3811 if {[string first "*" $res] == -1} { 3807 3812 MyMessageBox -parent . -title "No updates" \ … … 3824 3829 # special upgrade for windows, where the wish exec blocks upgrade of the exe directory 3825 3830 if {$::tcl_platform(platform) == "windows" && $::tcl_platform(os) != "Windows 95"} { 3826 if {![file exists [file join $::expgui(gsasdir) update.bat]]} { 3827 MyMessageBox -parent . -title "No update.bat" \ 3828 -message "File update.bat was not found. This should not happen. Will try to create it now." 3829 set fp [open [file join $::expgui(gsasdir) update.bat] w] 3830 puts $fp {@REM this script must be run from the GSAS installation directory 3831 set fp [open [file join $::expgui(gsasdir) selfupdate.bat] w] 3832 puts $fp {@REM this script must be run from the GSAS installation directory 3831 3833 @REM This is run to update the installation, the name of the EXP file is 3832 3834 @REM expected as an argument … … 3837 3839 .\svn\bin\svn cleanup . 3838 3840 .\svn\bin\svn update . 3839 @if (%1)==() goto Install2 3841 } 3842 puts $fp ".\svn\bin\svn cleanup $expgui(scriptdir)" 3843 puts $fp ".\svn\bin\svn update $expgui(scriptdir)" 3844 puts $fp {@if (%1)==() goto Install2 3840 3845 @echo **************************************************** 3841 3846 @echo Update has completed. Press return to restart EXPGUI … … 3851 3856 %COMSPEC% /c "start exe\ncnrpack.exe expgui\expgui" 3852 3857 exit 3853 } 3854 close $fp 3855 } 3858 } 3859 close $fp 3856 3860 # split the directory and EXP file and get rid os spaces in the directory name 3857 3861 set exp [file normalize $::expgui(expfile)] … … 3859 3863 cd $::expgui(gsasdir) 3860 3864 #run the batch file 3861 exec $::env(COMSPEC) /c {start .\ update.bat [file join $dir [file tail $exp]]} &3865 exec $::env(COMSPEC) /c {start .\selfupdate.bat [file join $dir [file tail $exp]]} & 3862 3866 exit 3863 3867 } … … 3869 3873 -icon error 3870 3874 } 3875 # do a quiet cleanup. Sometimes needed after install, and never hurts 3876 if [catch {set res [eval exec $SVN cleanup [list $::expgui(scriptdir)]]} err] { 3877 MyMessageBox -parent . -title "Error in cleanup" \ 3878 -message "Error performing cleanup. Will try to continue anyway. Error:\n$err" \ 3879 -icon error 3880 } 3871 3881 if [catch {set res [exec $SVN up $::expgui(gsasdir)]} err] { 3872 3882 MyMessageBox -parent . -title "Error updating" \ 3873 3883 -message "Error performing update:\n$err" \ 3884 -icon error 3885 return 3886 } elseif [catch {set res [exec $SVN up $::expgui(scriptdir)]} err] { 3887 MyMessageBox -parent . -title "Error updating" \ 3888 -message "Error performing scriptdir update:\n$err" \ 3874 3889 -icon error 3875 3890 return
Note: See TracChangeset
for help on using the changeset viewer.