Correct versions

This commit is contained in:
Tiago Almeida 2019-12-27 15:11:42 +00:00
parent adcdecee6c
commit 5d5521c048

View File

@ -44,14 +44,18 @@ f_compare_version(){
f_test_nano_version() {
local version
version="$(nano --version | cut -d ' ' -f 4)"
version="$(nano --version | cut -d ' ' -f 5 | head -n 1)"
echo $G_NANO_VERSION
echo $version
f_compare_version "$G_NANO_VERSION" "$version"
return $?
}
f_test_shellcheck_version() {
local version
version="$(nano --version | cut -d ' ' -f 8)"
version="$(shellcheck --version | cut -d ' ' -f 2 | head -n 2 | tail -n 1)"
echo $G_SHELLCHECK_VERSION
echo $version
f_compare_version "$G_SHELLCHECK_VERSION" "$version"
return $?
}
@ -60,8 +64,8 @@ printf "=================\n"
printf "TESTS\n"
printf "=================\n"
f_test_nano_version
printf "Nano Version ok? %s\n" "$?"
printf "Nano Version ok? %s (1 = ok)\n" "$?"
f_test_shellcheck_version
printf "Shellcheck Version ok? %s\n" "$?"
printf "Shellcheck Version ok? %s (1 = ok)\n" "$?"
# ....shellcheck -f diff *.sh | git apply | git commit -a -m "Shellcheck fast corrections"
shellcheck -- *.sh