Skip to content
Browse files

initial commit of scripts handling the submodules

  • Loading branch information...
1 parent c86c5b3 commit 92f9448ea03ebb4aeb33259e830ac5842865f6b0 @BeezyT committed
Showing with 116 additions and 2 deletions.
  1. +21 −0 download.sh
  2. +1 −1 ftp-git
  3. +1 −1 git-ftp
  4. +93 −0 sync.sh
View
21 download.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+#
+# FTP-GIT
+# Forward call to submodule
+#
+
+# get all params
+params=""
+while test $# != 0
+do
+ params="${params} $1"
+ shift
+done
+
+# forward call and add --sha1 option
+`dirname $0`/ftp-git/ftp-git.sh${params} --sha1=.git-ftp.log
+
+if [ $? -ne 0 ]; then
+ exit 1
+fi
2 ftp-git
@@ -1 +1 @@
-Subproject commit c92622bc955c06b71ed72c51f2e6306038bdc484
+Subproject commit d78c1c883a27fa8c1e07fd2b441ba2e18e8574b0
2 git-ftp
@@ -1 +1 @@
-Subproject commit 640db96c18e7621e9c972726f8600d3ca67ba9f0
+Subproject commit fc8bf715726e9c9e95d90f07b0a1b0c2edf4b9ef
View
93 sync.sh
@@ -0,0 +1,93 @@
+#!/bin/bash
+
+#
+# GIT-FTP
+# Forward call to submodule
+#
+
+
+# get all params
+params=""
+while test $# != 0
+do
+ params="${params} $1"
+ shift
+done
+
+check_merge() {
+ # check whether ftp-git branch has been merged
+ diff_logs=`git log ftp ^master | wc -l`
+ if [ $diff_logs -gt 0 ]; then
+ echo ""
+ echo "*****************************************************"
+ echo "FATAL:"
+ echo " the branch ftp has not been merged onto master yet."
+ echo " please do so and try again."
+ echo "*****************************************************"
+ echo ""
+ exit 1
+ fi
+}
+
+check_merge
+
+
+echo ""
+echo "*****************"
+echo "* *"
+echo "* #1 DOWNLOAD *"
+echo "* *"
+echo "*****************"
+echo ""
+
+`dirname $0`/download.sh${params}
+
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+check_merge
+
+
+echo ""
+echo ""
+echo "***************"
+echo "* *"
+echo "* #2 UPLOAD *"
+echo "* *"
+echo "***************"
+echo ""
+
+# forward call (without --http)
+cmd="`dirname $0`/git-ftp/git-ftp.sh${params}"
+cmd=`echo "$cmd" | sed "s/\(.*\) --http [^ ]* \(.*\)/\1 \2/"`
+$cmd
+
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+echo ""
+echo ""
+echo "**************"
+echo "* *"
+echo "* #3 MERGE *"
+echo "* *"
+echo "**************"
+echo ""
+
+echo "# Checkout ftp"
+git checkout ftp
+
+echo ""
+echo "# Merge master"
+git merge master
+
+echo ""
+echo "# Get new list from FTP"
+`dirname $0`/download.sh${params} --catchup
+
+echo ""
+echo "# Checkout master"
+git checkout master

0 comments on commit 92f9448

Please sign in to comment.
Something went wrong with that request. Please try again.