From 184c5e4d670585552e38f6cab18d4743a61f810c Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Tue, 12 Feb 2019 16:39:27 -0500 Subject: [PATCH] Merge #15216: Scripts and tools: Replace script name with a special parameter 8c9b8a3668 Replace script name with special parameter (Hennadii Stepanov) Pull request description: This PR improves UX; all others shell scripts ~(excluding travis linters)~ in the bitcoin repo have this feature. Before: ![screenshot from 2019-01-20 17-45-42](https://user-images.githubusercontent.com/32963518/51442159-b5cfec80-1ce2-11e9-8017-3b0b464ccaf8.png) After: ![screenshot from 2019-01-20 18-30-27](https://user-images.githubusercontent.com/32963518/51442166-bf595480-1ce2-11e9-9520-481518c3b288.png) cc: @jamesob @laanwj Tree-SHA512: 7924e5658a2efe81fd5591390ca5af1ff0558bd9d5693363b9f8addedb1d6b90aa16f11c9b361c6fdfbd931a959255817473a240c175dee95aefc7d2d4a10a36 --- test/lint/lint-whitespace.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test/lint/lint-whitespace.sh b/test/lint/lint-whitespace.sh index a7b309a000..bd1ead500b 100755 --- a/test/lint/lint-whitespace.sh +++ b/test/lint/lint-whitespace.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash # -# Copyright (c) 2017 The Bitcoin Core developers +# Copyright (c) 2017-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # @@ -12,11 +12,11 @@ export LC_ALL=C while getopts "?" opt; do case $opt in ?) - echo "Usage: .lint-whitespace.sh [N]" - echo " COMMIT_RANGE='' .lint-whitespace.sh" - echo " .lint-whitespace.sh -?" + echo "Usage: $0 [N]" + echo " COMMIT_RANGE='' $0" + echo " $0 -?" echo "Checks unstaged changes, the previous N commits, or a commit range." - echo "COMMIT_RANGE='47ba2c3...ee50c9e' .lint-whitespace.sh" + echo "COMMIT_RANGE='47ba2c3...ee50c9e' $0" exit 0 ;; esac