bug réparé

This commit is contained in:
eleonore12345 2024-07-08 11:19:27 +02:00
parent 7b9c5b97e8
commit c098bf66fe

View File

@ -38,7 +38,6 @@ while getopts ":h:s" option; do
esac esac
done done
if [ ! -d $REPO_PATH ]; then if [ ! -d $REPO_PATH ]; then
mkdir $REPO_PATH mkdir $REPO_PATH
fi fi
@ -73,7 +72,6 @@ if [ ! -d $REPO_NAME ]; then
git commit -m"sample4 deleted" git commit -m"sample4 deleted"
cd .. cd ..
if [ "$WITH_SUBMODULE" = "true" ]; then if [ "$WITH_SUBMODULE" = "true" ]; then
if [ ! -d $SUB_NAME ]; then
mkdir $SUB_NAME mkdir $SUB_NAME
cd $SUB_NAME cd $SUB_NAME
git init git init
@ -81,19 +79,34 @@ if [ ! -d $REPO_NAME ]; then
create_random_file 'sub_sample0' '1M' create_random_file 'sub_sample0' '1M'
git add . git add .
git commit -m"first 1M sample created" git commit -m"first 1M sample created"
cd .. cd ../$REPO_NAME
fi
cd $REPO_NAME
git submodule add ../submodule_for_performance_testing git submodule add ../submodule_for_performance_testing
git commit -am "adding $SUB_NAME module" git commit -am "adding $SUB_NAME module"
else fi
if [ -d $SUB_NAME ]; then cd ..
else # $REPO_NAME exists
if [[ "$WITH_SUBMODULE" = "true" && ! -d $SUB_NAME ]]; then
mkdir $SUB_NAME
cd $SUB_NAME
git init
git branch -m main
create_random_file 'sub_sample0' '1M'
git add .
git commit -m"first 1M sample created"
cd ../$REPO_NAME
git submodule add ../submodule_for_performance_testing
git commit -am "adding $SUB_NAME module"
elif [[ "$WITH_SUBMODULE" != "true" && -d $SUB_NAME ]]; then
cd $SUB_NAME cd $SUB_NAME
git rm submodule_for_performance_testing git rm submodule_for_performance_testing
cd .. cd ..
rm -rf $SUB_NAME rm -rf $SUB_NAME
fi fi
fi
cd ..
fi fi
cd .. cd ..