From 324ee36fe31763e507b422ab0a88e4230045e205 Mon Sep 17 00:00:00 2001 From: "Timoney, Daniel (dt5972)" Date: Wed, 15 Feb 2017 10:37:53 -0500 Subject: Initial commit for OpenECOMP SDN-C OA&M Change-Id: I7ab579fd0d206bf356f36d52dcdf4f71f1fa2680 Signed-off-by: Timoney, Daniel (dt5972) Former-commit-id: 2a9f0edd09581f907e62ec4689b5ac94dd5382ba --- dgbuilder/git_scripts/gitckout | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 dgbuilder/git_scripts/gitckout (limited to 'dgbuilder/git_scripts/gitckout') diff --git a/dgbuilder/git_scripts/gitckout b/dgbuilder/git_scripts/gitckout new file mode 100755 index 00000000..3db9db82 --- /dev/null +++ b/dgbuilder/git_scripts/gitckout @@ -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 -- cgit 1.2.3-korg