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.

35 lines
1.5 KiB

  1. #!/bin/bash
  2. if [ -f ".repo_initialized" ]; then
  3. echo "This repo is already initialized!"
  4. else
  5. if [ -f "README_PROJECT_TEMPLATE.md" ]; then
  6. echo "First run after creation from template."
  7. touch .repo_initialized
  8. echo "This file is checked by the 'init_after_clone' script." >> .repo_initialized
  9. rm -f README.md
  10. mv README_PROJECT_TEMPLATE.md README.md
  11. git add README.md README_PROJECT_TEMPLATE.md
  12. git commit -m "chore: from init_after_clone script: replace template readme"
  13. mv tcl_scripts/import_platform_and_projects.tcl tcl_scripts/import_platform_and_projects.tcl.gitsubstitute
  14. mv tcl_scripts/import_platform_only.tcl tcl_scripts/import_platform_only.tcl.gitsubstitute
  15. mv tcl_scripts/platform_create.tcl tcl_scripts/platform_create.tcl.gitsubstitute
  16. git add -f tcl_scripts/import_platform_and_projects.tcl tcl_scripts/import_platform_and_projects.tcl.gitsubstitute
  17. git add -f tcl_scripts/import_platform_only.tcl tcl_scripts/import_platform_only.tcl.gitsubstitute
  18. git add -f tcl_scripts/platform_create.tcl tcl_scripts/platform_create.tcl.gitsubstitute
  19. git commit -m "chore: from init_after_clone script: replace tcl scripts"
  20. git config --local core.hooksPath .githooks
  21. source ./clean_and_recreate_all --no-prompt --import-hw-platform-only
  22. else
  23. git config --local core.hooksPath .githooks
  24. source ./clean_and_recreate_all --no-prompt
  25. fi
  26. fi