From fcf1244046d91fe24471ff65babe6290662f86d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Tue, 23 Nov 2021 17:54:00 +0100 Subject: [PATCH] rename variable follow up of #44 --- scripts/dist-git/setup_git_package | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dist-git/setup_git_package b/scripts/dist-git/setup_git_package index c8e932d..d09332e 100755 --- a/scripts/dist-git/setup_git_package +++ b/scripts/dist-git/setup_git_package @@ -7,7 +7,7 @@ umask 0002 # Figure out the environment we're running in eval "$(crudini --format=sh --get /etc/dist-git/dist-git.conf dist-git)" REPODIR=$gitroot_dir -DEFAULT_MAIN=$default_branch +DEFAULT_BRANCH=$default_branch : ${git_author_name="Undefined"} : ${git_author_email="undefined@example.com"} @@ -63,7 +63,7 @@ fi # Sanity checks before we start doing damage [ $VERBOSE -gt 1 ] && echo "Checking package $PACKAGE..." -if [ -f $REPODIR/$PACKAGE.git/refs/heads/$DEFAULT_MAIN ] ; then +if [ -f $REPODIR/$PACKAGE.git/refs/heads/$DEFAULT_BRANCH ] ; then echo "ERROR: Package module $PACKAGE already exists!" >&2 exit 128 fi @@ -107,7 +107,7 @@ git config user.email "$git_author_email" git add . git commit -q -m 'Initial setup of the repo' git remote add origin $REPODIR/$PACKAGE.git -git push -q origin "$DEFAULT_MAIN" +git push -q origin "$DEFAULT_BRANCH" popd >/dev/null # Place the gitolite update hook in place since we're not using our own