You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tcl/bin/pickconfig.tcl
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,7 @@ proc initialize_config {} {
100
100
exit
101
101
destroy .
102
102
} else {
103
-
if {[catch {open~/.linuxcncrc} programin]} {
103
+
if {[catch {open$::env(HOME)/.linuxcncrc} programin]} {
104
104
return
105
105
} else {
106
106
set rcstring [read$programin]
@@ -660,7 +660,7 @@ proc prompt_copy configname {
660
660
set ncfiles [file normalize [file join $::myconfigs_node ../nc_files]]
661
661
file mkdir [file join $::myconfigs_node]
662
662
663
-
set obsoletedir [file normalize [file join ~ emc2]]
663
+
set obsoletedir [file normalize [file join $::env(HOME) emc2]]
664
664
if [file isdir $obsoletedir] {
665
665
tk_messageBox -title "Copy Configuration Notice"\
666
666
-message "A directory named:\n\
@@ -891,20 +891,20 @@ while {1} {
891
891
# test for ~/.linuxcncrc file and modify if needed.
892
892
# or make this file and add the var.
893
893
894
-
if {[file exists ~/.linuxcncrc]} {
894
+
if {[file exists $::env(HOME)/.linuxcncrc]} {
895
895
if {$::inifile == $::last_ini} {
896
896
exit
897
897
} else {
898
-
if {[catch {open~/.linuxcncrc} programin]} {
898
+
if {[catch {open$::env(HOME)/.linuxcncrc} programin]} {
899
899
return
900
900
} else {
901
901
set rcstring [read$programin]
902
902
catch {close$programin}
903
903
}
904
904
set ret [setVal $rcstring PICKCONFIG LAST_CONFIG $::inifile ]
905
905
catch {file copy -force $name$name.bak}
906
-
if {[catch {open~/.linuxcncrc w} fileout]} {
907
-
puts stdout [msgcat::mc "can't save %s"~/.linuxcncrc ]
906
+
if {[catch {open$::env(HOME)/.linuxcncrc w} fileout]} {
907
+
puts stdout [msgcat::mc "can't save %s"$::env(HOME)/.linuxcncrc ]
908
908
exit
909
909
}
910
910
puts$fileout$ret
@@ -914,8 +914,8 @@ while {1} {
914
914
}
915
915
set newfilestring "# .linuxcncrc is a startup configuration file for LinuxCNC. \n# format is INI like. \n# \[SECTION_NAME\]\n# VARNAME = varvalue \n# where section name is the name of the system writing to this file \n\n# written by pickconfig.tcl \n\[PICKCONFIG\]\nLAST_CONFIG = $::inifile\n"
916
916
917
-
if {[catch {open~/.linuxcncrc w+} fileout]} {
918
-
puts stderr [msgcat::mc "can't save %s"~/.linuxcncrc ]
917
+
if {[catch {open$::env(HOME)/.linuxcncrc w+} fileout]} {
918
+
puts stderr [msgcat::mc "can't save %s"$::env(HOME)/.linuxcncrc ]
0 commit comments