Further secured use of rm -r
[sgc2.git] / activate_sgc2_logging.praat
blob1cc64cd15ce38c2dc1c468c36fbdb44e62d88d7c
1 #!praat
3 # Create a file 'preferencesDirectory$'/sgc2/log/logPerformance
6 form Activate performance logging for SGC2
7         sentence Target_directory_(can_be_empty) ~/Documents
8 endform
11 call activate_sgc2_logging 'target_directory$'
14 procedure activate_sgc2_logging .targetDirectory$
15         createDirectory("'preferencesDirectory$'/sgc2")
16         createDirectory("'preferencesDirectory$'/sgc2/log")
17         
18         if startsWith(.targetDirectory$, "~")
19                 .targetDirectory$ = replace$(.targetDirectory$, "~", homeDirectory$, 1)
20         endif
21         
22         .targetDirectory$ > 'preferencesDirectory$'/sgc2/log/logPerformance.txt
23         newline$ >> 'preferencesDirectory$'/sgc2/log/logPerformance.txt
24 endproc