File tree 1 file changed +8
-4
lines changed
overlays/uzip/localize/files/usr/local/sbin
1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change 39
39
40
40
import os , sys , subprocess
41
41
42
+ include_file_path = "/usr/local/var/localize/include"
43
+ if os .path .isfile (include_file_path ):
44
+ print (include_file_path , "exists. Exiting." )
45
+ exit (0 )
46
+
42
47
got_hint = False
43
48
44
49
if os .geteuid () != 0 :
@@ -176,12 +181,11 @@ run(["tzsetup", timezone])
176
181
177
182
# Write a shell file that can be sourced at session startup time to export
178
183
# the environment variables
179
- target_file = "/usr/local/var/localize/include"
180
- os .makedirs (os .path .dirname (target_file ), exist_ok = True )
181
- f = open (target_file , "w+" )
184
+ os .makedirs (os .path .dirname (include_file_path ), exist_ok = True )
185
+ f = open (include_file_path , "w+" )
182
186
f .write (template .replace ("%locale%" , locale ).replace ("%timezone%" , timezone ))
183
187
f .close ()
184
- print ("--> Wrote" , target_file )
188
+ print ("--> Wrote" , include_file_path )
185
189
186
190
# It looks like this:
187
191
# LANG="de_DE.UTF-8"
You can’t perform that action at this time.
0 commit comments