Handbook
Glossary
upload-safely ( local username host remote -- )
Vocabulary
mason
.
common
Inputs
local
an
object
username
an
object
host
an
object
remote
an
object
Outputs
None
Definition
USING:
mason.config
namespaces
sequences
;
IN:
mason.common
::
upload-safely
( local username host remote -- )
remote
".incomplete"
append
:>
temp
{
username
"@"
host
":"
temp
}
concat
:>
scp-remote
scp-command
get
:>
scp
ssh-command
get
:>
ssh 5
[
{
scp local scp-remote
}
upload-process
]
retry
5
[
{
ssh host
"-l"
username
"mv"
temp remote
}
short-running-process
]
retry
;