on master help sign in
shellcheck: minor fixes to support all dsitros

checked with:: sudo ./utils/lxc.sh cmd -- make test.sh on ubu1804, ubu1910, fedora31 and archlinux. All checks OK except: ubu1604: uses shellcheck v0.3.7 (from 04/2015) which is no longer supported! Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>

commitf5f83b8a99a45198822f4e382575d3147e652e56 authorMarkus Heiser <markus.heiser@darmarit.de> dateSun 8 Mar 2020, 18:37 (7 years ago) parent04ad648
2 files changed+4−3
Makefile+2−1 utils/lib.sh+2−2
Makefile+2−1
@@ -1,5 +1,5 @@
11# -*- coding: utf-8; mode: makefile-gmake -*-
2−
2+.DEFAULT_GOAL=help
33include ./.config.mk
44
55PYOBJECTS = searx
@@ -104,6 +104,7 @@ test.pylint: pyenvinstall
104104 $(call cmd,pylint,searx/preferences.py)
105105 $(call cmd,pylint,searx/testing.py)
106106
107+# ubu1604: uses shellcheck v0.3.7 (from 04/2015), no longer supported!
107108test.sh:
108109 shellcheck -x utils/lib.sh
109110 shellcheck -x utils/filtron.sh
utils/lib.sh+2−2
@@ -4,9 +4,9 @@
44# shellcheck disable=SC2059,SC1117
55
66# ubuntu, debian, arch, fedora ...
7−DIST_ID=$(source /etc/os-release; echo $ID);
7+DIST_ID=$(source /etc/os-release; echo "$ID");
88# shellcheck disable=SC2034
9−DIST_VERS=$(source /etc/os-release; echo $VERSION_ID);
9+DIST_VERS=$(source /etc/os-release; echo "$VERSION_ID");
1010
1111ADMIN_NAME="${ADMIN_NAME:-$(git config user.name)}"
1212ADMIN_NAME="${ADMIN_NAME:-$USER}"