On 11/11/21 14:16, Oswald Buddenhagen wrote:
On Thu, Nov 11, 2021 at 01:47:41PM +0200, Vasi Vilvoiu wrote:
On 11/11/21 13:20, Simão Afonso wrote:
What's wrong with:
#!/bin/sh
# mbsync-encrypted
decrypt command <~/.config/mbsyncrc.encrypted
>"$XDG_RUNTIME_DIR/mbsyncrc"
mbsync -c "$XDG_RUNTIME_DIR/mbsyncrc" "$@"
rval=$?
rm "$XDG_RUNTIME_DIR/mbsyncrc"
exit $rval
No changes needed to mbsync itself.
AFAIK, tmpfs can reach swap under some circumstances, which is a no-no.
so use a pipe instead:
#!/bin/bash
mbsync -c <(decrypt command < ~/.config/mbsyncrc.encrypted) "$@"
(that's bash's process substitution, if you want to get background info.)
Thanks! For some reason I don't usually expect tools to correctly handle
stdin, I guess that's stupid on my part.
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel