Browse Source

feat: update init_after_clone script

master
Dennis Buchhorn 2 years ago
parent
commit
1bcabcf6fa
1 changed files with 23 additions and 5 deletions
  1. +23
    -5
      init_after_clone

+ 23
- 5
init_after_clone View File

@ -1,13 +1,25 @@
#!/bin/bash #!/bin/bash
if [ -f ".repo_initialized" ]; then if [ -f ".repo_initialized" ]; then
echo "This repo is already initialized!"
echo "############################################################"
echo "# This repo is already initialized!"
echo "############################################################"
else else
if [ -f "README_PROJECT_TEMPLATE.md" ]; then
echo "First run after creation from template."
echo "############################################################"
echo "# Update and initialize all submodules..."
echo "############################################################"
git submodule update --init --recursive
touch .repo_initialized
echo "This file is checked by the 'init_after_clone' script." >> .repo_initialized
if [ -f "README_PROJECT_TEMPLATE.md" ]; then
echo "############################################################"
echo "# First run after creation from template."
echo "#"
echo "# Have you copied the hardware description file and set"
echo "# the path to it in 'tcl_scripts/platform_create.tcl?'"
echo "#"
echo "# If not, set it and rerun this script!"
echo "############################################################"
read -p "Press ENTER to continue or CTRL+C to abort..."
rm -f README.md rm -f README.md
mv README_PROJECT_TEMPLATE.md README.md mv README_PROJECT_TEMPLATE.md README.md
@ -26,10 +38,16 @@ else
git config --local core.hooksPath .githooks git config --local core.hooksPath .githooks
touch .repo_initialized
echo "This file is checked by the 'init_after_clone' script." >> .repo_initialized
source ./clean_and_recreate_all --no-prompt --import-hw-platform-only source ./clean_and_recreate_all --no-prompt --import-hw-platform-only
else else
git config --local core.hooksPath .githooks git config --local core.hooksPath .githooks
touch .repo_initialized
echo "This file is checked by the 'init_after_clone' script." >> .repo_initialized
source ./clean_and_recreate_all --no-prompt source ./clean_and_recreate_all --no-prompt
fi fi
fi fi

Loading…
Cancel
Save