~mil/sxmo-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
5 4

[PATCH sxmo-utils 1/3] Add missing shellcheck source directives

Details
Message ID
<20220524190227.1293985-1-aren@peacevolution.org>
DKIM signature
pass
Download raw message
Patch: +9 -1
---
 .../default_hooks/one_button_e_reader/sxmo_hook_postwake.sh   | 4 +++-
 .../default_hooks/one_button_e_reader/sxmo_hook_presuspend.sh | 2 ++
 configs/default_hooks/one_button_e_reader/sxmo_hook_unlock.sh | 2 ++
 .../three_button_touchscreen/sxmo_hook_postwake.sh            | 2 ++
 4 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/configs/default_hooks/one_button_e_reader/sxmo_hook_postwake.sh b/configs/default_hooks/one_button_e_reader/sxmo_hook_postwake.sh
index 4a4eaa3..a82c0c8 100755
--- a/configs/default_hooks/one_button_e_reader/sxmo_hook_postwake.sh
+++ b/configs/default_hooks/one_button_e_reader/sxmo_hook_postwake.sh
@@ -2,9 +2,11 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors

# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh

UNSUSPENDREASON="$1"
# UNSUSPENDREASON="$1"

#The UNSUSPENDREASON can be "usb power", "cover", "rtc" (real-time clock
#periodic wakeup) or "button". You will likely want to check against this and
diff --git a/configs/default_hooks/one_button_e_reader/sxmo_hook_presuspend.sh b/configs/default_hooks/one_button_e_reader/sxmo_hook_presuspend.sh
index 7ab7367..19f3c4d 100755
--- a/configs/default_hooks/one_button_e_reader/sxmo_hook_presuspend.sh
+++ b/configs/default_hooks/one_button_e_reader/sxmo_hook_presuspend.sh
@@ -4,6 +4,8 @@

# This script is called prior to suspending

# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh

pkill clickclack
diff --git a/configs/default_hooks/one_button_e_reader/sxmo_hook_unlock.sh b/configs/default_hooks/one_button_e_reader/sxmo_hook_unlock.sh
index 6125924..f56e737 100755
--- a/configs/default_hooks/one_button_e_reader/sxmo_hook_unlock.sh
+++ b/configs/default_hooks/one_button_e_reader/sxmo_hook_unlock.sh
@@ -4,6 +4,8 @@

# This hook is called when the system becomes unlocked again

# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh

sxmo_log "transitioning to stage unlock"
diff --git a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
index a446d8a..b3c904d 100644
--- a/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
+++ b/configs/default_hooks/three_button_touchscreen/sxmo_hook_postwake.sh
@@ -2,6 +2,8 @@
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors

# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh

UNSUSPENDREASON="$1"
-- 
2.36.1

[PATCH sxmo-utils 2/3] hook_scripts: fix bashism

Details
Message ID
<20220524190227.1293985-2-aren@peacevolution.org>
In-Reply-To
<20220524190227.1293985-1-aren@peacevolution.org> (view parent)
DKIM signature
pass
Download raw message
Patch: +1 -1
---
 configs/default_hooks/sxmo_hook_scripts.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configs/default_hooks/sxmo_hook_scripts.sh b/configs/default_hooks/sxmo_hook_scripts.sh
index 801163c..2d87933 100755
--- a/configs/default_hooks/sxmo_hook_scripts.sh
+++ b/configs/default_hooks/sxmo_hook_scripts.sh
@@ -17,7 +17,7 @@ write_line() {
get_title() {
	title=""
	# Process substitution because source won't work with data piped from stdin.
	. <(head "$1" | grep '# title="[^\\"]*"' | sed 's/^# //g')
	eval "$(head "$1" | grep '# title="[^\\"]*"' | sed 's/^# //g')"
	if [ -n "$title" ]; then
		echo "$title"
	else
-- 
2.36.1

[PATCH sxmo-utils 3/3] statusbar: remove unused variable

Details
Message ID
<20220524190227.1293985-3-aren@peacevolution.org>
In-Reply-To
<20220524190227.1293985-1-aren@peacevolution.org> (view parent)
DKIM signature
pass
Download raw message
Patch: +0 -2
mmcli also happens to be somewhat slow, so removing this should save
about 100ms of execution time as an extra benefit
---
 configs/default_hooks/sxmo_hook_statusbar.sh | 2 --
 1 file changed, 2 deletions(-)

diff --git a/configs/default_hooks/sxmo_hook_statusbar.sh b/configs/default_hooks/sxmo_hook_statusbar.sh
index 88ebd29..626dfd6 100644
--- a/configs/default_hooks/sxmo_hook_statusbar.sh
+++ b/configs/default_hooks/sxmo_hook_statusbar.sh
@@ -11,8 +11,6 @@
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh

VPNDEVICE="$(nmcli con show 2>/dev/null | grep -E 'wireguard|vpn' | awk '{ print $1 }')"

set_time() {
	date "+${SXMO_STATUS_DATE_FORMAT:-%H:%M}" | head -c -1 | sxmo_status.sh add 99-time
}
-- 
2.36.1

[sxmo-utils/patches/.build.yml] build success

builds.sr.ht <builds@sr.ht>
Details
Message ID
<CK884CBW5JNN.37EP8N8ZTFCJX@cirno>
In-Reply-To
<20220524190227.1293985-3-aren@peacevolution.org> (view parent)
DKIM signature
missing
Download raw message
sxmo-utils/patches/.build.yml: SUCCESS in 30s

[Add missing shellcheck source directives][0] from [ArenM][1]

[0]: https://lists.sr.ht/~mil/sxmo-devel/patches/32497
[1]: aren@peacevolution.org

✓ #765649 SUCCESS sxmo-utils/patches/.build.yml https://builds.sr.ht/~mil/job/765649

Re: [PATCH sxmo-utils 2/3] hook_scripts: fix bashism

Details
Message ID
<CK8C90W50T8D.2RBU53XBI4ZSQ@zach-macbookpro121>
In-Reply-To
<20220524190227.1293985-2-aren@peacevolution.org> (view parent)
DKIM signature
fail
Download raw message
DKIM signature: fail
>  	# Process substitution because source won't work with data piped from stdin.
> -	. <(head "$1" | grep '# title="[^\\"]*"' | sed 's/^# //g')
> +	eval "$(head "$1" | grep '# title="[^\\"]*"' | sed 's/^# //g')"

You'll want to remove the comment too, since it doesn't apply any more.

Re: [PATCH sxmo-utils 3/3] statusbar: remove unused variable

Details
Message ID
<23V69EP0JRNNH.2ROAU2DZUGVQR@stacyharper.net>
In-Reply-To
<20220524190227.1293985-3-aren@peacevolution.org> (view parent)
DKIM signature
pass
Download raw message
Applied with the comment removed. Thanks a lot !

To git.sr.ht:~mil/sxmo-utils
   91d2aab6..c3558e1e  c3558e1e -> master
Reply to thread Export thread (mbox)