bootstrap.image.upload: Use pscp on Windows for uploading boot images
since c:\ paths are treated as hostnames and the command fails.db4
parent
7053d28b6d
commit
1b35e19a03
|
@ -1,9 +1,8 @@
|
||||||
! Copyright (C) 2008 Slava Pestov.
|
! Copyright (C) 2008 Slava Pestov.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: checksums checksums.openssl splitting assocs
|
USING: bootstrap.image checksums checksums.openssl io
|
||||||
kernel io.files bootstrap.image sequences io namespaces make
|
io.directories io.encodings.ascii io.files io.files.temp
|
||||||
io.launcher math io.encodings.ascii io.files.temp io.pathnames
|
io.launcher io.pathnames kernel make namespaces sequences system ;
|
||||||
io.directories ;
|
|
||||||
IN: bootstrap.image.upload
|
IN: bootstrap.image.upload
|
||||||
|
|
||||||
SYMBOL: upload-images-destination
|
SYMBOL: upload-images-destination
|
||||||
|
@ -26,9 +25,18 @@ SYMBOL: upload-images-destination
|
||||||
] each
|
] each
|
||||||
] with-file-writer ;
|
] 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 ( -- )
|
: upload-images ( -- )
|
||||||
[
|
[
|
||||||
"scp" ,
|
\ scp-name get-global scp-name or ,
|
||||||
boot-image-names %
|
boot-image-names %
|
||||||
checksums , destination ,
|
checksums , destination ,
|
||||||
] { } make try-process ;
|
] { } make try-process ;
|
||||||
|
|
Loading…
Reference in New Issue