[Pkg-debile-commits] [debile-slave] 12/28: add executable for downloading/updating a folder of firehose-oriented semantic patches

Sylvestre Ledru sylvestre at alioth.debian.org
Mon Aug 19 14:55:20 UTC 2013


This is an automated email from the git hooks/post-receive script.

sylvestre pushed a commit to branch master
in repository debile-slave.

commit d078170aa5bd15d23d7384dcaf379078860d3c3b
Author: Matthieu Caneill <matthieu.caneill42 at gmail.com>
Date:   Mon Aug 12 10:01:27 2013 +0200

    add executable for downloading/updating a folder of firehose-oriented semantic patches
---
 bin/update-coccinelle-semantic-patches |   35 ++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/bin/update-coccinelle-semantic-patches b/bin/update-coccinelle-semantic-patches
new file mode 100755
index 0000000..9c16508
--- /dev/null
+++ b/bin/update-coccinelle-semantic-patches
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+# This file is intended to update a Coccinellery git repository
+# with only the semantic patches present in CONTRIB/firehose/
+
+repo_url="git at github.com:coccinelle/coccinellery.git"
+
+
+if [ "$#" -ne 1 ]; then
+  echo "usage: bin/update-coccinelle-semantic patches FOLDER_NAME"
+  echo "If FOLDER_NAME doesn't exist, it will be created and initialized;"
+  echo "otherwise, it will only be updated."
+  exit
+fi
+
+if [ ! -d "$1" ]; then
+  echo "directory doesn't exist, creating it..."
+  mkdir "$1"
+fi
+
+cd "$1"
+
+if [ ! -d ".git" ]; then
+  echo "this directory is not a git repo, initializing it..."
+  git init
+  echo "adding remote ${repo_url}..."
+  git remote add origin ${repo_url}
+  # -f ?
+  echo "configuring the folder to fetch..."
+  git config core.sparsecheckout true
+  echo "CONTRIB/firehose/" >> .git/info/sparse-checkout
+fi
+
+echo "updating repository..."
+git pull origin master

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-debile/debile-slave.git



More information about the Pkg-debile-commits mailing list