Re: [PATCH v3 2/2] travis-ci: build documentation
- From
Lars Schneider <larsxschneider@gmail.com>
- Date
- May 4, 2016, 08:04 UTC
- Message-ID
- <32CC7549-3A50-42F3-A6CC-9B15EFA01A46@gmail.com>
- In-Reply-To
- <xmqq8tzrp2pd.fsf@gitster.mtv.corp.google.com>
On 03 May 2016, at 17:43, Junio C Hamano <gitster@pobox.com> wrote:
Show 30 quoted lines
> Lars Schneider <larsxschneider@gmail.com> writes: > >> On 02 May 2016, at 22:45, Junio C Hamano <gitster@pobox.com> wrote: >> >>> larsxschneider@gmail.com writes: >>> >>>> +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/