diff --git a/git-cvs2git.sh b/git-cvs2git.sh index 9c216ec..a77ca3f 100755 --- a/git-cvs2git.sh +++ b/git-cvs2git.sh @@ -55,9 +55,11 @@ if [ $DEBUG ] ; then echo "************found ini file: $inifilename" ; fi # Make this null if you want lots of output. Still quite a bit anyway QUIET="-q" curlsilent="-s" +suppress=" > /dev/null 2>&1" if [ $DEBUG ] ; then QUIET= curlsilent="-v" + suppress= fi # Make this null to get curl to check ssl cert checkSSL="-k" @@ -132,7 +134,7 @@ fi # Make sure credentials taken from store # The first time you pull or push it will ask for credentials and then save them in a file. -git config --global credential.helper store +git config --global credential.helper store $suppress # # Clone the CVS repository @@ -148,7 +150,7 @@ fi # Then get it fully from CVS cd $CVSFiles -cvs -d:ext:shell.koozali.org:/cvs/$2 $QUIET checkout $1 +cvs -d:ext:shell.koozali.org:/cvs/$2 $QUIET checkout $1 # Prepare variable for file in repo to indicate core or contrib. # and init gitea organisation @@ -225,7 +227,7 @@ if [ "$RESPONSE" == "200" ]; then # And Clone it if [ $DEBUG ] ; then echo "git clone $GITEAHOST/$ORGGITEA/$1.git" ; fi cd $GITFiles - git clone "$GITEAHOST/$ORGGITEA/$1.git" + git clone "$GITEAHOST/$ORGGITEA/$1.git" $suppress #GIT_SSL_NO_VERIFY=true git clone "$GITEAHOST/$ORGGITEA/$1.git" NOREPO=0 else @@ -335,7 +337,7 @@ fi # Pull in the auto created or updated files cd $GITFiles #GIT_SSL_NO_VERIFY=true git clone "$GITEAHOST/$ORGGITEA/$1.git" -git clone "$GITEAHOST/$ORGGITEA/$1.git" +git clone "$GITEAHOST/$ORGGITEA/$1.git" $suppress if [ ! -d $GITFiles/$1 ] ; then echo "ERROR*******Unable to access the new repo directory for $HTTP_URL $GITFiles/$1" @@ -347,7 +349,7 @@ cd $CVSFiles/$1/$BASEORCONTRIB # Fully populate the directory (gets the tar file - which is not strictly in CVS) and creates the directory source tree # applying the patches to the base in the tar file. # Might need to replace this by the code from the makefile if we decide to move "make prep" to git moe likely we'll implement a new one "make gitprep". -make prep +make prep $suppress # Extract the directory name for the file tree (it will include the name of the module plus some version information) # Same trick that we use in the makefile.common - taking the name and verison from the .spec file. @@ -387,7 +389,7 @@ echo $BASEORCONTRIB > contriborbase BASESPECFILE=$(basename $SPECFILE) for fpath in "$BASESPECFILE" "Makefile" do - echo "************Copying $CVSFiles/$1/$BASEORCONTRIB/$fpath" + if [ $DEBUG ] ; then echo "************Copying $CVSFiles/$1/$BASEORCONTRIB/$fpath" ; fi if [[ -f $CVSFiles/$1/$BASEORCONTRIB/$fpath ]] ; then cp -R $CVSFiles/$1/$BASEORCONTRIB/$fpath . else @@ -514,9 +516,9 @@ else # Third party package # copy over the archive file and make sure the extension is tracked by git-lfs if [ $DEBUG ] ; then echo "************Found 3rd party package $NAME" ; fi - git lfs install - git lfs track "*.$EXT" - git add .gitattributes + git lfs install $suppress + git lfs track "*.$EXT" $suppress + git add .gitattributes $suppress #git config lfs.http://gitea.bjsystems.co.uk/SMEContribs/bugzilla.git/info/lfs.locksverify true if [[ -f $CVSFiles/$1/$BASEORCONTRIB/$ARCHIVEFILE ]] ; then if [ $DEBUG ] ; then echo "************Copying archivefile $CVSFiles/$1/$BASEORCONTRIB/$ARCHIVEFILE" ; fi @@ -533,7 +535,7 @@ if [[ $ARCHIVEFILE != "$TREEPATH.tar.gz" ]] ; then fi # Take out any bogus dates: -/usr/bin/BogusDateBot.sh $(basename $SPECFILE) +/usr/bin/BogusDateBot.sh $(basename $SPECFILE) $suppress # If it is an SME package, take out the patches and then update the release. if [[ "$NAME" =~ ^(smeserver-|e-smith-).* ]]; then @@ -588,7 +590,7 @@ if [ ! -e $GITFiles/common ]; then else # Just refresh it cd $GITFiles/common - git pull + git pull $suppress fi # Now make sure that the make-archive is executible @@ -667,7 +669,7 @@ if [[ "$NAME" =~ ^(smeserver-|e-smith-).* ]]; then # Extract the text from the response PARAGRAPH=`echo $response | jq -r '.choices[].text'` # Add it to what was there already - echo "************Creating description for $1" + if [ $DEBUG ] ; then echo "************Creating description for $1" ; fi echo -e "\n\n## Description\n" >> README.md echo -e "
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.*" >> README.md echo -e "*Once it has been checked, then this comment will be deleted*" >> README.md @@ -730,24 +732,24 @@ if [ $DEBUG ] ; then echo $RESPONSE ; fi cd $GITFiles/$1 # stage and commit all the files created locally -git add -A +git add -A $suppress echo "$1 git status" >>gitstatus.log git status >>gitstatus.log -git status +git status $suppress COMMENT="initial commit of file from CVS for $1 on `date`" git commit -m "$COMMENT" $QUIET # push the converted git repository to the remote -git remote remove origin -git remote add origin "$GITEAHOST/$ORGGITEA/$1.git" +git remote remove origin $suppress +git remote add origin "$GITEAHOST/$ORGGITEA/$1.git" $suppress #GIT_SSL_NO_VERIFY=true git push --force -u $QUIET origin master -git push --force -u $QUIET origin master +git push --force -u $QUIET origin master $suppress # Now create the version and release tag for these files RELEASE=`rpm --queryformat '%{release}\n' --specfile $NAME.spec | head -n 1` TAG=$VERSION-$RELEASE -git tag -a $TAG -m "$COMMENT" -git push origin $TAG +git tag -a $TAG -m "$COMMENT" $suppress +git push origin $TAG $suppress echo "Created $1 Repo: $HTTP_URL - Comment:$COMMENT tag:$TAG" exit 0