[geany/plugins.geany.org] 209da8: create SOURCESDIR in case it doesn't exist and clone the geany-plugins sources into it via git

Dominic Hopf git-noreply at xxxxx
Fri Jun 29 22:39:34 UTC 2012


Branch:      refs/heads/master
Author:      Dominic Hopf <dmaphy at googlemail.com>
Committer:   Dominic Hopf <dmaphy at googlemail.com>
Date:        Fri, 29 Jun 2012 22:39:34
Commit:      209da8ef4b9db08e7d2ba22a609faad8fecbc758
             https://github.com/geany/plugins.geany.org/commit/209da8ef4b9db08e7d2ba22a609faad8fecbc758

Log Message:
-----------
create SOURCESDIR in case it doesn't exist and clone the geany-plugins sources into it via git


Modified Paths:
--------------
    gencontent.sh

Modified: gencontent.sh
44 files changed, 22 insertions(+), 22 deletions(-)
===================================================================
@@ -97,35 +97,35 @@ in_array()
 
 
 if [ ! -d $SOURCESDIR ]; then
-	echo -e "Directory containing sources $SOURCESDIR could not be found!\n"
-	exit 1
-else
-	cd $SOURCESDIR
-	VERSION=`git tag -l | tail -n1`
-	echo "Found latest Geany-Plugins version: $VERSION."
+	echo -e "Directory containing sources $SOURCESDIR could not be found. Trying to clone from git...\n"
+	git clone git://github.com/geany/geany-plugins.git $SOURCESDIR
+fi
 
-	git branch | grep $VERSION
+cd $SOURCESDIR
+VERSION=`git tag -l | tail -n1`
+echo "Found latest Geany-Plugins version: $VERSION."
 
-	if [ $? -ne 0 ]; then
-		echo "A local branch does not exist for $VERSION."
-		echo "Checking if $VERSION exists remote.."
-		UPSTREAM=`git branch -r | grep $VERSION`
+git branch | grep $VERSION
 
-		if [ $? -eq 0 ]; then
-			echo "Remote branch $UPSTREAM found. Checking out..."
-			git checkout -b $VERSION $UPSTREAM
-		else
-			echo "Could not find a remote branch. Checking out the tag $VERSION..."
-			git checkout $VERSION > /dev/null
-		fi
+if [ $? -ne 0 ]; then
+	echo "A local branch does not exist for $VERSION."
+	echo "Checking if $VERSION exists remote.."
+	UPSTREAM=`git branch -r | grep $VERSION`
+
+	if [ $? -eq 0 ]; then
+		echo "Remote branch $UPSTREAM found. Checking out..."
+		git checkout -b $VERSION $UPSTREAM
 	else
-		echo "A local branch exists for $VERSION. Updating..."
-		git checkout $VERSION && git pull
+		echo "Could not find a remote branch. Checking out the tag $VERSION..."
+		git checkout $VERSION > /dev/null
 	fi
-
-	cd - > /dev/null
+else
+	echo "A local branch exists for $VERSION. Updating..."
+	git checkout $VERSION && git pull
 fi
 
+cd - > /dev/null
+
 
 if [ ! -d $CONTENTDIR ]; then
 	echo -e "Directory containing contents $CONTENTDIR could not be found!\n"


@@ Diff output truncated at 100000 characters. @@


--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).



More information about the Plugins-Commits mailing list