next question: remote-test / remote-home ?
Andreas Reuleaux
rx at a-rx.info
Thu Aug 4 00:01:59 BST 2022
Hi,
Great! Thanks a lot (and for your other mail as well),
and I learned some bits, indeed at least these:
* to use (:check ... ) - rather than my (unless ...)
* and apparently using just
(:apply (mrun "cp" ".bashrc" ".bashrc.orig"))
works (in the remote users home dir) then.
I would still find it more readable to write
(:apply (mrun "cp" "~/.bashrc" "~/.bashrc.orig"))
in some special strings maybe [?] (that know how to resolve "~"),
but I don't have to make my life any more difficult than necessary,
writing things like:
#?"${(get-connattr :remote-home)}.bashrc"
etc., if the above works.
And yes, I will read the manual more thoroughly.
Thanks again!
-A
Sean Whitton <spwhitton at spwhitton.name> writes:
> Hello,
>
> On Wed 03 Aug 2022 at 06:07pm +01, Andreas Reuleaux wrote:
>
>> Maybe I have to create (just) a property w/ defprop ? - Just a boolean
>> test, really, if a (remote) file .bashrc.orig exists in a (remote) home
>> directory? How?
>
> Yes, exactly. Something like
>
> (defprop foo :posix ()
> (:check (remote-exists-p ".bashrc.orig."))
> (:apply (mrun "mv" ".bashrc" ".bashrc.orig")))
More information about the sgo-software-discuss
mailing list