You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
877 B

  1. # Aliases
  2. # Interface
  3. namespace eval ::alias {
  4. namespace export wproj
  5. namespace import ::custom::write_project_tcl_git
  6. namespace import ::current_project
  7. namespace import ::common::get_property
  8. }
  9. # Define
  10. namespace eval ::alias {
  11. proc wproj {} {
  12. # Change directory project directory if not in it yet
  13. set proj_dir [regsub {\/vivado_proj$} [get_property DIRECTORY [current_project]] {}]
  14. set current_dir [pwd]
  15. if {
  16. [string compare -nocase $proj_dir $current_dir]
  17. } then {
  18. puts "Not in project directory"
  19. puts "Changing directory to: ${proj_dir}"
  20. cd $proj_dir
  21. }
  22. # Generate project
  23. set proj_file [current_project].tcl
  24. puts $proj_file
  25. write_project_tcl_git -no_copy_sources -force $proj_file
  26. }
  27. }