[CCSDK-28] populated the seed code for dgbuilder
[ccsdk/distribution.git] / dgbuilder / git_scripts / gitckout
diff --git a/dgbuilder/git_scripts/gitckout b/dgbuilder/git_scripts/gitckout
new file mode 100755 (executable)
index 0000000..3db9db8
--- /dev/null
@@ -0,0 +1,15 @@
+if [ "$#" != "2" ]
+then
+       echo "Usage $0 commitId full_path_to_the_source_file"
+       exit
+fi
+fileName=$(basename $2)
+dirName=$(dirname $2)
+commitId=$1
+cd $dirName
+if [ -e "$2" ]
+then
+       rm $2 2>/dev/null
+fi
+git checkout $commitId $fileName
+cat $fileName