]> gitweb.factorcode.org Git - factor.git/commitdiff
use tilde paths instead of home append-path.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 27 Feb 2018 01:17:15 +0000 (17:17 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 27 Feb 2018 01:17:15 +0000 (17:17 -0800)
basis/command-line/command-line.factor
basis/editors/visual-studio-code/visual-studio-code.factor
basis/tools/scaffold/scaffold-docs.factor
basis/tools/scaffold/scaffold.factor
extra/cpu/8080/emulator/emulator.factor
extra/mason/config/config.factor
extra/mason/release/sign/sign.factor
extra/webapps/mason/backend/backend.factor
extra/websites/concatenative/concatenative.factor

index aeb26c8e5e29336faf73b7389e4d468c4d734aff..39217ce61dd1683a47b5b372ca1f2077f4b50aa7 100644 (file)
@@ -24,9 +24,6 @@ SYMBOL: command-line
 : (command-line) ( -- args )
     OBJ-ARGS special-object sift [ alien>native-string ] map ;
 
-: rc-path ( name -- path )
-    home prepend-path ;
-
 : try-user-init ( file -- )
     "user-init" get swap '[
         _ [ ?run-file ] [
@@ -37,14 +34,14 @@ SYMBOL: command-line
     ] when ;
 
 : run-bootstrap-init ( -- )
-    ".factor-boot-rc" rc-path try-user-init ;
+    "~/.factor-boot-rc" try-user-init ;
 
 : run-user-init ( -- )
-    ".factor-rc" rc-path try-user-init ;
+    "~/.factor-rc" try-user-init ;
 
 : load-vocab-roots ( -- )
     "user-init" get [
-        ".factor-roots" rc-path dup exists? [
+        "~/.factor-roots" dup exists? [
             utf8 file-lines harvest [ add-vocab-root ] each
         ] [ drop ] if
         "roots" get [
index 3b43d7443c5b2b8f7a59ce797a88f213875647fd..910e07d883cb89385b5393824a26935a20d129df 100644 (file)
@@ -33,7 +33,7 @@ M: linux find-visual-studio-code-invocation
     {
         [ "code" which ]
         [ "Code" which ]
-        [ home "VSCode-linux-x64/Code" append-path ]
+        [ "~/VSCode-linux-x64/Code" ]
         [ "/usr/share/code/code" ]
     } [ [ exists? ] ?1arg ] map-compose 0|| ;
 
index 2667d6b5db071fc3a5d95af1619b941a298ac3b0..7c047a59b7434b2d1d2f2c8b304a0ad2739b597a 100644 (file)
@@ -101,22 +101,16 @@ HELP: scaffold-vocab
 { $description "Creates a directory in the given root for a new vocabulary and adds a main .factor file and an authors.txt file." } ;
 
 HELP: scaffold-emacs
-{ $description "Touches the .emacs file in your home directory and provides a clickable link to open it in an editor." } ;
+{ $description "Touches the " { $snippet ".emacs" } " file in your home directory and provides a clickable link to open it in an editor." } ;
 
 HELP: scaffold-factor-boot-rc
-{ $description "Touches the .factor-boot-rc file in your home directory and provides a clickable link to open it in an editor." } ;
+{ $description "Touches the " { $snippet ".factor-boot-rc" } " file in your home directory and provides a clickable link to open it in an editor." } ;
 
 HELP: scaffold-factor-rc
-{ $description "Touches the .factor-rc file in your home directory and provides a clickable link to open it in an editor." } ;
+{ $description "Touches the " { $snippet ".factor-rc" } " file in your home directory and provides a clickable link to open it in an editor." } ;
 
 HELP: scaffold-factor-roots
-{ $description "Touches the .factor-roots file in your home directory and provides a clickable link to open it in an editor." } ;
-
-HELP: scaffold-rc
-{ $values
-    { "path" "a pathname string" }
-}
-{ $description "Touches the given path in your home directory and provides a clickable link to open it in an editor." } ;
+{ $description "Touches the " { $snippet ".factor-roots" } " file in your home directory and provides a clickable link to open it in an editor." } ;
 
 HELP: using
 { $description "Stores the vocabularies that are pulled into the documentation file from looking up the stack effect types." } ;
@@ -137,7 +131,6 @@ ARTICLE: "tools.scaffold" "Scaffold tool"
 "Types that are unrecognized by the scaffold generator will be of type " { $link null } ". The developer should change these to strings that describe the stack effect names instead." $nl
 "Scaffolding a configuration file:"
 { $subsections
-    scaffold-rc
     scaffold-factor-boot-rc
     scaffold-factor-rc
     scaffold-factor-roots
index 11deb7acb6145e86d98669c0925847ed5557259d..898c4e43d6227071ec96e97ffedc64409998a2a9 100644 (file)
@@ -352,21 +352,18 @@ ${example-indent}}
     [ touch-file ]
     [ "Click to edit: " write <pathname> . ] bi ;
 
-: scaffold-rc ( path -- )
-    [ home ] dip append-path touch. ;
-
 : scaffold-factor-boot-rc ( -- )
-    ".factor-boot-rc" scaffold-rc ;
+    "~/.factor-boot-rc" touch. ;
 
 : scaffold-factor-rc ( -- )
-    ".factor-rc" scaffold-rc ;
+    "~/.factor-rc" touch. ;
 
 : scaffold-mason-rc ( -- )
-    ".factor-mason-rc" scaffold-rc ;
+    "~/.factor-mason-rc" touch. ;
 
 : scaffold-factor-roots ( -- )
-    ".factor-roots" scaffold-rc ;
+    "~/.factor-roots" touch. ;
 
 HOOK: scaffold-emacs os ( -- )
 
-M: unix scaffold-emacs ( -- ) ".emacs" scaffold-rc ;
+M: unix scaffold-emacs ( -- ) "~/.emacs" touch. ;
index adb06e68f09c8e366488f194c8eacd9f75e88ded..9db998d259a4ee6cba796086a964e27e28c73bfc 100644 (file)
@@ -453,7 +453,7 @@ SYMBOL: rom-root
 
 : rom-dir ( -- string )
     rom-root get [
-        home "roms" append-path dup exists? [ drop f ] unless
+        "~/roms" dup exists? [ drop f ] unless
     ] unless* ;
 
 : load-rom* ( seq cpu -- )
index 04adaaf0e9db8b5116c69b7190091bac1e4a3f4b..971c0aa466f37edae3f438cf52a0eff9a115aab5 100644 (file)
@@ -5,10 +5,7 @@ IN: mason.config
 
 ! (Optional) Location for build directories
 SYMBOL: builds-dir
-
-builds-dir get-global [
-    home "builds" append-path builds-dir set-global
-] unless
+builds-dir [ "~/builds" ] initialize
 
 ! Who sends build report e-mails.
 SYMBOL: builder-from
@@ -18,13 +15,11 @@ SYMBOL: builder-recipients
 
 ! (Optional) CPU architecture to build for.
 SYMBOL: target-cpu
-
-target-cpu get-global [ cpu target-cpu set-global ] unless
+target-cpu [ cpu ] initialize
 
 ! (Optional) OS to build for.
 SYMBOL: target-os
-
-target-os get-global [ os target-os set-global ] unless
+target-os [ os ] initialize
 
 ! (Optional) Architecture variant suffix.
 SYMBOL: target-variant
@@ -37,12 +32,10 @@ SYMBOL: builder-debug
 
 ! URL for counter notifications.
 SYMBOL: counter-url
-
 counter-url [ "http://builds.factorcode.org/counter" ] initialize
 
 ! URL for status notifications.
 SYMBOL: status-url
-
 status-url [ "http://builds.factorcode.org/status-update" ] initialize
 
 ! Password for status notifications.
@@ -63,7 +56,6 @@ SYMBOL: docs-directory
 
 ! URL to notify server about new docs
 SYMBOL: docs-update-url
-
 docs-update-url [ "http://builds.factorcode.org/docs-update" ] initialize
 
 ! Boolean. Do we upload package binaries?
index 27ecd8932a4cd58e57c000696f4a7a78f7e24cc8..fa330e3eb6dc28f64ccd9ec879d489c885bd7897 100644 (file)
@@ -19,11 +19,9 @@ HOOK: cert-path os ( -- path/f )
 
 M: object cert-path f ;
 
-M: macosx cert-path
-    home "config/mac_app.cer" append-path ;
+M: macosx cert-path "~/config/mac_app.cer" ;
 
-M: windows cert-path
-    home "config/FactorSPC.pfx" append-path ;
+M: windows cert-path "~/config/FactorSPC.pfx" ;
 >>
 
 HOOK: sign-factor-app os ( -- )
index ad9a66e3d7c532531c53cd9031556fc910b4c7da..11d6179c8babfdb4b2905017d16dac543a82d267 100644 (file)
@@ -82,7 +82,7 @@ counter "COUNTER" {
 : os/cpu ( builder -- string )
     [ os>> ] [ cpu>> ] bi "/" glue ;
 
-: mason-db ( -- db ) home "mason.db" append-path <sqlite-db> ;
+: mason-db ( -- db ) "~/mason.db" <sqlite-db> ;
 
 : with-mason-db ( quot -- )
     mason-db [ with-transaction ] with-db ; inline
index a004702d417a3029781dbba19d1e7f3c12c253db..91b4ad3a3e9d1a8bf24b4201e10a91d632e85d29 100644 (file)
@@ -31,7 +31,7 @@ webapps.mason.backend.watchdog
 websites.factorcode ;
 IN: websites.concatenative
 
-: website-db ( -- db ) home "website.db" append-path <sqlite-db> ;
+: website-db ( -- db ) "~/website.db" <sqlite-db> ;
 
 : init-factor-db ( -- )
     mason-db [ init-mason-db ] with-db
@@ -107,9 +107,9 @@ SYMBOLS: key-password key-file dh-file ;
         <pastebin> <factor-recaptcha> <login-config> <factor-boilerplate> website-db <alloy> "paste.factorcode.org" add-responder
         <planet> <login-config> <factor-boilerplate> website-db <alloy> "planet.factorcode.org" add-responder
         <mason-app> <login-config> <factor-boilerplate> website-db <alloy> "builds.factorcode.org" add-responder
-        home "docs" append-path <help-webapp> "docs.factorcode.org" add-responder
-        home "cgi" append-path <gitweb> "gitweb.factorcode.org" add-responder
-        home "irclogs" append-path <static> t >>allow-listings "irclogs.factorcode.org" add-responder
+        "~/docs" <help-webapp> "docs.factorcode.org" add-responder
+        "~/cgi" <gitweb> "gitweb.factorcode.org" add-responder
+        "~/irclogs" <static> t >>allow-listings "irclogs.factorcode.org" add-responder
     main-responder set-global ;
 
 : <factor-secure-config> ( -- config )