Skip to content

Commit

Permalink
Fix a bug with -overwrite (The-OpenROAD-Project#1171)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonblanchard authored Jul 1, 2022
1 parent abb9d59 commit f9b5781
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/tcl_commands/all.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,13 @@ proc prep {args} {

puts_info "Run Directory: $run_path"

set ::env(RUN_TAG) "$tag"
set ::env(RUN_DIR) "$run_path"
set ::env(RESULTS_DIR) "$::env(RUN_DIR)/results"
set ::env(TMP_DIR) "$::env(RUN_DIR)/tmp"
set ::env(LOGS_DIR) "$::env(RUN_DIR)/logs"
set ::env(REPORTS_DIR) "$::env(RUN_DIR)/reports"

if { [file exists $::env(GLB_CFG_FILE)] } {
if { [info exists flags_map(-overwrite)] } {
puts_info "Removing existing $::env(RUN_DIR)..."
Expand All @@ -499,13 +506,6 @@ proc prep {args} {
}
}

set ::env(RUN_TAG) "$tag"
set ::env(RUN_DIR) "$run_path"
set ::env(RESULTS_DIR) "$::env(RUN_DIR)/results"
set ::env(TMP_DIR) "$::env(RUN_DIR)/tmp"
set ::env(LOGS_DIR) "$::env(RUN_DIR)/logs"
set ::env(REPORTS_DIR) "$::env(RUN_DIR)/reports"

# file mkdir works like shell mkdir -p, i.e., its OK if it already exists
file mkdir $::env(RESULTS_DIR) $::env(TMP_DIR) $::env(LOGS_DIR) $::env(REPORTS_DIR)

Expand Down

0 comments on commit f9b5781

Please sign in to comment.