Skip to content
Snippets Groups Projects
Commit 75f1d831 authored by vlorentz's avatar vlorentz
Browse files

init-py-repo: Create directory if it does not exist, and don't overwrite it if it doesn't

parent 12a739d7
No related branches found
No related tags found
1 merge request!324init-py-repo: Create directory if it does not exist, and don't overwrite it if it doesn't
......@@ -15,15 +15,19 @@ while (( "$#" )); do
esac
shift
done
if [ -z "$repo_dir" -o ! -d "$repo_dir" ] ; then
if [ -z "$repo_dir" ] ; then
usage
fi
copier copy $TEMPLATE_REPO $repo_dir
cd "$repo_dir"
git init .
git add .
git commit -m "import template from $TEMPLATE_REPO (init-py-repo)"
if [ ! -d "$repo_dir" ] ; then
copier copy $TEMPLATE_REPO $repo_dir
cd "$repo_dir"
git init .
git add .
git commit -m "import template from $TEMPLATE_REPO (init-py-repo)"
else
cd "$repo_dir"
fi
if [ "$create_gitlab" = "yes" ]; then
echo "Create the project on gitlab"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment