mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-09 09:15:47 +02:00
Scripts: use POSIX subcommand invocation
This commit is contained in:
parent
4d153b7d8e
commit
359ada47c7
2 changed files with 4 additions and 4 deletions
|
@ -49,7 +49,7 @@ function check_diff {
|
||||||
local line
|
local line
|
||||||
local entry
|
local entry
|
||||||
|
|
||||||
git_diff=`git diff --name-status --find-copies-harder --diff-filter=AC --relative=pages/ master`
|
git_diff=$(git diff --name-status --find-copies-harder --diff-filter=AC --relative=pages/ master)
|
||||||
|
|
||||||
if [ -n "$git_diff" ]; then
|
if [ -n "$git_diff" ]; then
|
||||||
echo -e "Check PR: git diff:\n$git_diff" >&2
|
echo -e "Check PR: git diff:\n$git_diff" >&2
|
||||||
|
@ -108,7 +108,7 @@ MSG_NOT_DIR='The file `%s` does not look like a directory.\n'
|
||||||
MSG_NOT_FILE='The file `%s` does not look like a regular file.\n'
|
MSG_NOT_FILE='The file `%s` does not look like a regular file.\n'
|
||||||
MSG_NOT_MD='The file `%s` does not have a `.md` extension.\n'
|
MSG_NOT_MD='The file `%s` does not have a `.md` extension.\n'
|
||||||
|
|
||||||
PLATFORMS=`ls pages/`
|
PLATFORMS=$(ls pages/)
|
||||||
|
|
||||||
if [ "$TRAVIS" = "true" ] && [ "$TRAVIS_REPO_SLUG" = "tldr-pages/tldr" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS" = "true" ] && [ "$TRAVIS_REPO_SLUG" = "tldr-pages/tldr" ] && [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
check_diff
|
check_diff
|
||||||
|
|
|
@ -17,7 +17,7 @@ function run_tests {
|
||||||
# Special test function for Travis CI pull request builds.
|
# Special test function for Travis CI pull request builds.
|
||||||
# Runs run_tests collecting errors for tldr-bot.
|
# Runs run_tests collecting errors for tldr-bot.
|
||||||
function run_tests_pr {
|
function run_tests_pr {
|
||||||
errs=`run_tests 2>&1`
|
errs=$(run_tests 2>&1)
|
||||||
|
|
||||||
if [ -n "$errs" ]; then
|
if [ -n "$errs" ]; then
|
||||||
echo -e "Test failed!\n$errs\n" >&2
|
echo -e "Test failed!\n$errs\n" >&2
|
||||||
|
@ -30,7 +30,7 @@ function run_tests_pr {
|
||||||
# Additional checks for Travis CI pull request builds.
|
# Additional checks for Travis CI pull request builds.
|
||||||
# Only taken as suggestions, does not make the build fail.
|
# Only taken as suggestions, does not make the build fail.
|
||||||
function run_checks_pr {
|
function run_checks_pr {
|
||||||
msgs=`bash scripts/check-pr.sh`
|
msgs=$(bash scripts/check-pr.sh)
|
||||||
|
|
||||||
if [ -n "$msgs" ]; then
|
if [ -n "$msgs" ]; then
|
||||||
echo -e "\nCheck PR reported the following message(s):\n$msgs\n" >&2
|
echo -e "\nCheck PR reported the following message(s):\n$msgs\n" >&2
|
||||||
|
|
Loading…
Add table
Reference in a new issue