summaryrefslogtreecommitdiff
path: root/mailsync
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2025-08-30 09:49:43 -0500
committerzachir <zachir@librem.one>2025-08-30 09:49:43 -0500
commit9e4558b7be8ee49969302b09f04037f7800b47aa (patch)
tree938a216e5f55f7ab32393e51eb7287824a857630 /mailsync
parentc77ba40391840191296134a0d20a3135b358c857 (diff)
Separate declaration and export
Diffstat (limited to 'mailsync')
-rwxr-xr-xmailsync8
1 files changed, 6 insertions, 2 deletions
diff --git a/mailsync b/mailsync
index dff4e73..8ac5978 100755
--- a/mailsync
+++ b/mailsync
@@ -28,7 +28,8 @@ eval "$(grep -h -- \
"$HOME/.config/zsh/.zshenv" "$HOME/.bashrc" "$HOME/.zshrc" "$HOME/.config/zsh/.zshrc" \
"$HOME/.pam_environment" 2>/dev/null)"
-export GPG_TTY="$(tty)"
+GPG_TTY="$(tty)"
+export GPG_TTY
[ -n "$MBSYNCRC" ] && alias mbsync='mbsync -c $MBSYNCRC' || MBSYNCRC="$HOME/.config/isync/mbsyncrc"
@@ -39,7 +40,10 @@ case "$(uname)" in
;;
*)
case "$(readlink -f /sbin/init)" in
- *systemd*|*openrc*) export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus ;;
+ *systemd*|*openrc*)
+ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id -u)/bus
+ export DBUS_SESSION_BUS_ADDRESS
+ ;;
esac
# remember if a display server is running since `ps` doesn't always contain a display
pgrepoutput="$(pgrep -a X\(org\|wayland\))"