On 06/15/2016 11:08 AM, Miguel Flores Silverio wrote:
Signed-off-by: Miguel Flores Silverio <floresmigu3l@xxxxxxxxx> ---
Request for when you are sending out another version of a patch (v2, v3 etc.) Can you give a small summary right below the commit here describing what has changed since the previous version? This is simple enough I can go back and review but it's a good habit to get into for larger patch sets.
scripts/generate-perf-man.sh | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100755 scripts/generate-perf-man.sh diff --git a/scripts/generate-perf-man.sh b/scripts/generate-perf-man.sh new file mode 100755 index 0000000..9820568 --- /dev/null +++ b/scripts/generate-perf-man.sh @@ -0,0 +1,36 @@ +#! /bin/sh +# Small script to generate perf-man tarball. +# The script relies on having LINUX_GIT set in you local .bashrc + +if [ -f ~/.bashrc ]; then + source ~/.bashrc # LINUX_GIT is set +fi +#LINUX_GIT=path/to/linus's/kernel
Is this an actual comment or a leftover test line?
+if [ ! -d "$LINUX_GIT" ]; +then + echo "Error: \$LINUX_GIT is not set to the upstream git tree." + exit 1 +fi + +BASEDIR=$(dirname "$(cd $(dirname $BASH_SOURCE[0]) && pwd)") +pushd "$LINUX_GIT" +KERNEL_VERSION=$( awk '/^VERSION =/ {print $3}' Makefile ) +KERNEL_PATCHLEVEL=$( awk '/^PATCHLEVEL =/ {print $3}' Makefile ) + +# By defaults the scripts uses the upstream git tree kernel version +# and patch level. The script will prompt for confirmation of these +# default values or change them. +echo "Generating perf-man for ${KERNEL_VERSION}.${KERNEL_PATCHLEVEL}" +read -p "Would you like to override this? [y/n] " -n 1 -r +echo +if [[ $REPLY =~ ^[Yy]$ ]]; +then
Can you give a small prompt here explaining what you will be prompting for next? The first time I tried to run this I didn't know there would be a 2nd prompt and just gave the full x.y in the version prompt.
+ read -p "Version: " KERNEL_VERSION + read -p "Patch Level: " KERNEL_PATCHLEVEL +fi + +cd tools/perf/Documentation/ +make +tar -czvf $BASEDIR/perf-man-${KERNEL_VERSION}.${KERNEL_PATCHLEVEL}.tar.gz *.1 +make clean +popd -- 2.7.4
_______________________________________________ kernel mailing list kernel@xxxxxxxxxxxxxxxxxxxxxxx https://lists.fedoraproject.org/admin/lists/kernel@xxxxxxxxxxxxxxxxxxxxxxx