webapps.mason.docs-update: make docs path configurable

db4
Slava Pestov 2010-10-02 19:05:11 -07:00
parent 8f44a059f5
commit 8a95b763dd
1 changed files with 7 additions and 5 deletions

View File

@ -1,15 +1,17 @@
! Copyright (C) 2010 Slava Pestov. ! Copyright (C) 2010 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
USING: accessors continuations furnace.actions help.html USING: accessors continuations namespaces sequences
http.server.responses io.directories io.directories.hierarchy furnace.actions help.html http.server.responses io.directories
io.launcher io.files io.pathnames kernel memoize threads io.directories.hierarchy io.launcher io.files io.pathnames
webapps.mason.utils ; kernel memoize threads webapps.mason.utils ;
IN: webapps.mason.docs-update IN: webapps.mason.docs-update
SYMBOL: docs-path
: update-docs ( -- ) : update-docs ( -- )
home [ home [
"newdocs" make-directory "newdocs" make-directory
"newdocs" [ { "tar" "xfz" "../docs.tar.gz" } try-process ] with-directory "newdocs" [ { "tar" "xfz" } docs-path get suffix try-process ] with-directory
"docs" exists? [ "docs" "docs.old" move-file ] when "docs" exists? [ "docs" "docs.old" move-file ] when
"newdocs/docs" "docs" move-file "newdocs/docs" "docs" move-file