bug réparé
This commit is contained in:
parent
7b9c5b97e8
commit
c098bf66fe
@ -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,27 +72,41 @@ 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
|
git branch -m main
|
||||||
git branch -m main
|
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 ../$REPO_NAME
|
||||||
cd ..
|
|
||||||
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
|
|
||||||
if [ -d $SUB_NAME ]; then
|
|
||||||
cd $SUB_NAME
|
|
||||||
git rm submodule_for_performance_testing
|
|
||||||
cd ..
|
|
||||||
rm -rf $SUB_NAME
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
cd ..
|
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
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user