Added more debug messages
This commit is contained in:
parent
60d0913f48
commit
3d62c04c19
@ -82,9 +82,9 @@ chmod +x $GITFiles/common/make-archive.sh
|
|||||||
# See if repo exits in git
|
# See if repo exits in git
|
||||||
RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
||||||
if [ "$RESPONSE" == "200" ]; then
|
if [ "$RESPONSE" == "200" ]; then
|
||||||
echo "Repository for $1/$2 exists!"
|
if [ $DEBUG ] ; then echo "Repository for $1/$2 exists!" ; fi
|
||||||
else
|
else
|
||||||
echo "Repository for $1/$2 does not exist"
|
if [ $DEBUG ] ; then echo "Repository for $1/$2 does not exist" ; fi
|
||||||
logname="git-cvs2git-create-$2-$1-$(date +'%FT%H%M').log"
|
logname="git-cvs2git-create-$2-$1-$(date +'%FT%H%M').log"
|
||||||
while true; do
|
while true; do
|
||||||
read -p "Do you wish to run git-cvs2git?(y/n) " yn
|
read -p "Do you wish to run git-cvs2git?(y/n) " yn
|
||||||
@ -97,7 +97,7 @@ else
|
|||||||
# And check it is now there
|
# And check it is now there
|
||||||
RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
RESPONSE=$(curl $curlsilent -o /dev/null -w "%{http_code}" "$GITEAHOST/api/v1/repos/$ORG_NAME/$REPO_NAME")
|
||||||
if [ "$RESPONSE" == "200" ]; then
|
if [ "$RESPONSE" == "200" ]; then
|
||||||
echo "Repository for $1/$2 created sucessfully!"
|
if [ $DEBUG ] ; then echo "Repository for $1/$2 created sucessfully!" ; fi
|
||||||
else
|
else
|
||||||
echo "git-cvs2git.sh was unable to create $1/$2 sucessfully"
|
echo "git-cvs2git.sh was unable to create $1/$2 sucessfully"
|
||||||
exit 1
|
exit 1
|
||||||
@ -110,7 +110,7 @@ echo $GITFiles
|
|||||||
if [[ -d $REPO_NAME ]] ; then
|
if [[ -d $REPO_NAME ]] ; then
|
||||||
# Should delete everything....
|
# Should delete everything....
|
||||||
cd $GITFiles/$REPO_NAME
|
cd $GITFiles/$REPO_NAME
|
||||||
echo "Deleting all files in $GITFiles/$REPO_NAME"
|
if [ $DEBUG ] ; then echo "Deleting all files in $GITFiles/$REPO_NAME" ; fi
|
||||||
rm -rf "$REPO_NAME"
|
rm -rf "$REPO_NAME"
|
||||||
fi
|
fi
|
||||||
cd $GITFiles
|
cd $GITFiles
|
||||||
@ -126,7 +126,7 @@ cd $GITFiles/$REPO_NAME
|
|||||||
# and run mockbuild
|
# and run mockbuild
|
||||||
logname="mockbuild-$2-$1-$(date +'%FT%H%M').log"
|
logname="mockbuild-$2-$1-$(date +'%FT%H%M').log"
|
||||||
if make mockbuild 2>&1 > $logname ; then
|
if make mockbuild 2>&1 > $logname ; then
|
||||||
echo "Looks like mockbuild worked"
|
echo "Looks like mockbuild worked for $1/$2"
|
||||||
echo "$(date +'%FT%H%M') Mockbuild worked for $1/$2 " >> $GITFiles/mockbuilds.log
|
echo "$(date +'%FT%H%M') Mockbuild worked for $1/$2 " >> $GITFiles/mockbuilds.log
|
||||||
else
|
else
|
||||||
echo "Mockbuild failed"
|
echo "Mockbuild failed"
|
||||||
|
Loading…
Reference in New Issue
Block a user