bootstrap.image.upload: Use pscp on Windows for uploading boot images

since c:\ paths are treated as hostnames and the command fails.
db4
Doug Coleman 2015-02-05 13:43:49 -08:00
parent 7053d28b6d
commit 1b35e19a03
1 changed files with 13 additions and 5 deletions

View File

@ -1,9 +1,8 @@
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: checksums checksums.openssl splitting assocs
kernel io.files bootstrap.image sequences io namespaces make
io.launcher math io.encodings.ascii io.files.temp io.pathnames
io.directories ;
USING: bootstrap.image checksums checksums.openssl io
io.directories io.encodings.ascii io.files io.files.temp
io.launcher io.pathnames kernel make namespaces sequences system ;
IN: bootstrap.image.upload
SYMBOL: upload-images-destination
@ -26,9 +25,18 @@ SYMBOL: upload-images-destination
] each
] with-file-writer ;
! Windows scp doesn't like pathnames with colons, it treats them as hostnames.
! Workaround for uploading checksums.txt created with temp-file.
! e.g. C:\Users\\Doug\\AppData\\Local\\Temp/factorcode.org\\Factor/checksums.txt
! ssh: Could not resolve hostname c: no address associated with name
HOOK: scp-name os ( -- path )
M: object scp-name "scp" ;
M: windows scp-name "pscp" ;
: upload-images ( -- )
[
"scp" ,
\ scp-name get-global scp-name or ,
boot-image-names %
checksums , destination ,
] { } make try-process ;