Chinthakayala, Sheshashailavas (sc2914) | d156997 | 2017-08-28 05:25:46 -0900 | [diff] [blame] | 1 | if [ "$#" != "2" ] |
2 | then | ||||
3 | echo "Usage $0 commitId full_path_to_the_source_file" | ||||
4 | exit | ||||
5 | fi | ||||
6 | fileName=$(basename $2) | ||||
7 | dirName=$(dirname $2) | ||||
8 | commitId=$1 | ||||
9 | cd $dirName | ||||
10 | if [ -e "$2" ] | ||||
11 | then | ||||
12 | rm $2 2>/dev/null | ||||
13 | fi | ||||
14 | git checkout $commitId $fileName | ||||
15 | cat $fileName |