|
|
@ -1,13 +1,25 @@ |
|
|
|
#!/bin/bash |
|
|
|
|
|
|
|
if [ -f ".repo_initialized" ]; then |
|
|
|
echo "This repo is already initialized!" |
|
|
|
echo "############################################################" |
|
|
|
echo "# This repo is already initialized!" |
|
|
|
echo "############################################################" |
|
|
|
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 |
|
|
|
mv README_PROJECT_TEMPLATE.md README.md |
|
|
@ -26,10 +38,16 @@ else |
|
|
|
|
|
|
|
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 |
|
|
|
else |
|
|
|
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 |
|
|
|
fi |
|
|
|
fi |