forked from Ponysearch/Ponysearch
Merge pull request #194 from return42/fix-misc
[fix] some minor issues in Makefile and shell scripts
This commit is contained in:
commit
b558c5aa36
3 changed files with 18 additions and 6 deletions
3
Makefile
3
Makefile
|
@ -43,6 +43,9 @@ clean: py.clean docs.clean node.clean test.clean
|
||||||
$(Q)find . -name '*~' -exec rm -f {} +
|
$(Q)find . -name '*~' -exec rm -f {} +
|
||||||
$(Q)find . -name '*.bak' -exec rm -f {} +
|
$(Q)find . -name '*.bak' -exec rm -f {} +
|
||||||
|
|
||||||
|
lxc.clean:
|
||||||
|
$(Q)rm -rf lxc-env
|
||||||
|
|
||||||
PHONY += search.checker search.checker.%
|
PHONY += search.checker search.checker.%
|
||||||
search.checker: install
|
search.checker: install
|
||||||
$(Q)./manage pyenv.cmd searx-checker -v
|
$(Q)./manage pyenv.cmd searx-checker -v
|
||||||
|
|
17
utils/lib.sh
17
utils/lib.sh
|
@ -78,9 +78,18 @@ required_commands() {
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
set_terminal_colors() {
|
set_terminal_colors() {
|
||||||
_colors=8
|
# https://en.wikipedia.org/wiki/ANSI_escape_code
|
||||||
|
|
||||||
|
# CSI (Control Sequence Introducer) sequences
|
||||||
|
_show_cursor='\e[?25h'
|
||||||
|
_hide_cursor='\e[?25l'
|
||||||
|
|
||||||
|
# SGR (Select Graphic Rendition) parameters
|
||||||
_creset='\e[0m' # reset all attributes
|
_creset='\e[0m' # reset all attributes
|
||||||
|
|
||||||
|
# original specification only had 8 colors
|
||||||
|
_colors=8
|
||||||
|
|
||||||
_Black='\e[0;30m'
|
_Black='\e[0;30m'
|
||||||
_White='\e[1;37m'
|
_White='\e[1;37m'
|
||||||
_Red='\e[0;31m'
|
_Red='\e[0;31m'
|
||||||
|
@ -271,7 +280,7 @@ prefix_stdout () {
|
||||||
echo -e "${prefix}$line"
|
echo -e "${prefix}$line"
|
||||||
done)
|
done)
|
||||||
# some piped commands hide the cursor, show cursory when the stream ends
|
# some piped commands hide the cursor, show cursory when the stream ends
|
||||||
echo -en "\e[?25h"
|
echo -en "$_show_cursor"
|
||||||
}
|
}
|
||||||
|
|
||||||
append_line() {
|
append_line() {
|
||||||
|
@ -1548,7 +1557,7 @@ pkg_install() {
|
||||||
;;
|
;;
|
||||||
arch)
|
arch)
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
pacman -Sy --noconfirm $@
|
pacman --noprogressbar -Sy --noconfirm $@
|
||||||
;;
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
|
@ -1580,7 +1589,7 @@ pkg_remove() {
|
||||||
;;
|
;;
|
||||||
arch)
|
arch)
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
pacman -R --noconfirm $@
|
pacman --noprogressbar -R --noconfirm $@
|
||||||
;;
|
;;
|
||||||
fedora)
|
fedora)
|
||||||
# shellcheck disable=SC2068
|
# shellcheck disable=SC2068
|
||||||
|
|
|
@ -45,8 +45,8 @@ ubu2010_boilerplate="$ubu1904_boilerplate"
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
archlinux_boilerplate="
|
archlinux_boilerplate="
|
||||||
pacman -Syu --noconfirm
|
pacman --noprogressbar -Syu --noconfirm
|
||||||
pacman -S --noconfirm inetutils git curl wget sudo
|
pacman --noprogressbar -S --noconfirm inetutils git curl wget sudo
|
||||||
echo 'Set disable_coredump false' >> /etc/sudo.conf
|
echo 'Set disable_coredump false' >> /etc/sudo.conf
|
||||||
"
|
"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue