[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / git_scripts / gitcurbranch
diff --git a/dgbuilder/git_scripts/gitcurbranch b/dgbuilder/git_scripts/gitcurbranch
new file mode 100755 (executable)
index 0000000..5a82e48
--- /dev/null
@@ -0,0 +1,13 @@
+if [ "$#" != "1" ]
+then
+       echo "Usage $0 gitLocalRepositoryDir"
+       exit
+fi
+localGitRepository=$1
+cd $localGitRepository
+if [ -e "$localGitRepository" ]
+then
+       git rev-parse --abbrev-ref HEAD
+else
+       echo Git Local repository not set
+fi