1#!/bin/bash 2# Create a reST :ref: list of changed documents for the release notes 3# comparing the specified tag with master branch 4# 5# 6 7if [ -z $1 ]; then 8 echo 9 echo Create a reST :ref: list of change documents for the release notes 10 echo comparing the specified tag with the master branch 11 echo 12 echo Usage: 13 echo \ \ changed-docs.sh upstream/release_3.0 [changed amount] 14 echo 15 echo \ \ where the optional [changed amount] \(default 10\) is the number 16 echo \ \ of lines added/modified/deleted before showing up in this report. 17 echo 18elif [ "$(basename $(pwd))" != "acrn-hypervisor" ]; then 19 echo 20 echo Script must be run in the acrn-hypervisor directory and not $(basename $(pwd)) 21else 22 dir=`dirname $0` 23 24 git diff --stat `git rev-parse $1` `git rev-parse master` | \ 25 grep \.rst | \ 26 awk -v changes=$2 -f $dir/changed-docs.awk 27fi 28