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
done
if [ ! -d $REPO_PATH ]; then
mkdir $REPO_PATH
fi
@ -73,27 +72,41 @@ if [ ! -d $REPO_NAME ]; then
git commit -m"sample4 deleted"
cd ..
if [ "$WITH_SUBMODULE" = "true" ]; then
if [ ! -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 ..
fi
cd $REPO_NAME
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"
else
if [ -d $SUB_NAME ]; then
cd $SUB_NAME
git rm submodule_for_performance_testing
cd ..
rm -rf $SUB_NAME
fi
fi
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
git rm submodule_for_performance_testing
cd ..
rm -rf $SUB_NAME
fi
fi
cd ..