From: Junio C Hamano <hidden> Date: 2016-06-16 02:19:09
Lars Schneider [off-list ref] writes:
On 02 May 2016, at 22:45, Junio C Hamano [off-list ref] wrote:
quoted
larsxschneider@gmail.com writes:
quoted
+set -e
+
+LINKS=$(grep --recursive --only-matching --no-filename --perl-regexp \
+ '(?<=linkgit:).*?(?=\[\d+\])' Documentation/* \
+ | sort -u \
+)
+
+for LINK in $LINKS; do
+ echo "Checking linkgit:$LINK..."
+ test -s Documentation/$LINK.txt
+done
Please separate the above link check out of this step and do so
separately after the move of test body to a separate script
settles.
OK. I also wonder if the link check should rather go to the
"check-docs" Makefile target?
That sounds like a good direction.
Which in turn means that people on all platforms are welcome to run
it, which in turn means that the script must be even more portable,
with avoiding GNUism and bash-isms etc.
From: Lars Schneider <hidden> Date: 2016-06-16 02:19:10
On 03 May 2016, at 17:43, Junio C Hamano [off-list ref] wrote:
Lars Schneider [off-list ref] writes:
quoted
On 02 May 2016, at 22:45, Junio C Hamano [off-list ref] wrote:
quoted
larsxschneider@gmail.com writes:
quoted
+set -e
+
+LINKS=$(grep --recursive --only-matching --no-filename --perl-regexp \
+ '(?<=linkgit:).*?(?=\[\d+\])' Documentation/* \
+ | sort -u \
+)
+
+for LINK in $LINKS; do
+ echo "Checking linkgit:$LINK..."
+ test -s Documentation/$LINK.txt
+done
Please separate the above link check out of this step and do so
separately after the move of test body to a separate script
settles.
OK. I also wonder if the link check should rather go to the
"check-docs" Makefile target?
That sounds like a good direction.
Which in turn means that people on all platforms are welcome to run
it, which in turn means that the script must be even more portable,
with avoiding GNUism and bash-isms etc.
OK. I am not that experienced with shell scripting and therefore it
is hard for me to distinguish between the different shell features.
Do you know/can you recommend the most basic shell to test/work
with? A quick Google search told me that "dash" from Ubuntu seems
to be a good baseline as it aims to support pretty much only POSIX [1].
Thanks,
Lars
[1] http://www.cyberciti.biz/faq/debian-ubuntu-linux-binbash-vs-bindash-vs-binshshell/
From: Eric Wong <hidden> Date: 2016-06-16 02:19:10
Lars Schneider [off-list ref] wrote:
OK. I am not that experienced with shell scripting and therefore it
is hard for me to distinguish between the different shell features.
Do you know/can you recommend the most basic shell to test/work
with? A quick Google search told me that "dash" from Ubuntu seems
to be a good baseline as it aims to support pretty much only POSIX [1].
Yes, I recommend dash as your /bin/sh if you're using a
Debian-based system ("Debian Almquist shell") such as Ubuntu.
Also, the Debian "devscripts" package has a tool called
"checkbashisms" which I have also found very useful.
Maybe ksh(93) or posh could be good, too, but it's been a
while...
I also rely on checking the manpages-posix and manpages-posix-dev
in the "non-free" section of Debian ("multiverse" in Ubuntu?)
From: Christian Couder <hidden> Date: 2016-06-16 02:19:10
On Wed, May 4, 2016 at 10:04 AM, Lars Schneider
[off-list ref] wrote:
On 03 May 2016, at 17:43, Junio C Hamano [off-list ref] wrote:
quoted
Lars Schneider [off-list ref] writes:
quoted
On 02 May 2016, at 22:45, Junio C Hamano [off-list ref] wrote:
quoted
larsxschneider@gmail.com writes:
quoted
+set -e
+
+LINKS=$(grep --recursive --only-matching --no-filename --perl-regexp \
+ '(?<=linkgit:).*?(?=\[\d+\])' Documentation/* \
+ | sort -u \
+)
+
+for LINK in $LINKS; do
+ echo "Checking linkgit:$LINK..."
+ test -s Documentation/$LINK.txt
+done
Please separate the above link check out of this step and do so
separately after the move of test body to a separate script
settles.
OK. I also wonder if the link check should rather go to the
"check-docs" Makefile target?
That sounds like a good direction.
Which in turn means that people on all platforms are welcome to run
it, which in turn means that the script must be even more portable,
with avoiding GNUism and bash-isms etc.
OK. I am not that experienced with shell scripting and therefore it
is hard for me to distinguish between the different shell features.
Do you know/can you recommend the most basic shell to test/work
with? A quick Google search told me that "dash" from Ubuntu seems
to be a good baseline as it aims to support pretty much only POSIX [1].