From a7d8cfbdef1631489420f897710f74710d6ff9f4 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 18 Jun 2022 16:53:17 -0700 Subject: [PATCH] Revert "Revert "use tilde paths in more places."" This reverts commit 1cc398b1c51c3b19188580074250482b04493d88. --- .../editors/visual-studio-code/visual-studio-code.factor | 2 +- basis/tools/scaffold/scaffold.factor | 2 +- extra/cpu/8080/emulator/emulator.factor | 2 +- extra/io/files/acls/macosx/macosx-tests.factor | 2 +- extra/mason/config/config.factor | 8 +++----- extra/mason/release/sign/sign.factor | 6 ++---- extra/webapps/mason/backend/backend.factor | 2 +- extra/websites/concatenative/concatenative.factor | 8 ++++---- 8 files changed, 14 insertions(+), 18 deletions(-) diff --git a/basis/editors/visual-studio-code/visual-studio-code.factor b/basis/editors/visual-studio-code/visual-studio-code.factor index 3cd1267f4c..867a3c42e6 100644 --- a/basis/editors/visual-studio-code/visual-studio-code.factor +++ b/basis/editors/visual-studio-code/visual-studio-code.factor @@ -19,7 +19,7 @@ M: visual-studio-code find-visual-studio-code-path { [ "code" which ] [ "Code" which ] - [ home "VSCode-linux-x64/Code" append-path ] + [ "~/VSCode-linux-x64/Code" ] [ "/usr/share/code/code" ] } [ dup file-exists? [ drop f ] unless ] map-compose 0|| ] } { macosx [ diff --git a/basis/tools/scaffold/scaffold.factor b/basis/tools/scaffold/scaffold.factor index 779214939f..5575c5b417 100644 --- a/basis/tools/scaffold/scaffold.factor +++ b/basis/tools/scaffold/scaffold.factor @@ -373,7 +373,7 @@ ${example-indent}} [ "Click to edit: " write . ] bi ; : scaffold-rc ( path -- ) - [ home ] dip append-path scaffold-file ; + home prepend-path scaffold-file ; : scaffold-factor-boot-rc ( -- ) ".factor-boot-rc" scaffold-rc ; diff --git a/extra/cpu/8080/emulator/emulator.factor b/extra/cpu/8080/emulator/emulator.factor index 7f6eaa62f6..b2744af4b9 100644 --- a/extra/cpu/8080/emulator/emulator.factor +++ b/extra/cpu/8080/emulator/emulator.factor @@ -453,7 +453,7 @@ SYMBOL: rom-root : rom-dir ( -- string ) rom-root get [ - home "roms" append-path dup file-exists? [ drop f ] unless + "~/roms" dup file-exists? [ drop f ] unless ] unless* ; : load-rom* ( seq cpu -- ) diff --git a/extra/io/files/acls/macosx/macosx-tests.factor b/extra/io/files/acls/macosx/macosx-tests.factor index e3942e2b6f..9a65acb364 100644 --- a/extra/io/files/acls/macosx/macosx-tests.factor +++ b/extra/io/files/acls/macosx/macosx-tests.factor @@ -4,4 +4,4 @@ USING: io.files.acls.macosx io.pathnames system tools.test ; IN: io.files.acls.macosx.tests { } [ vm-path acls. ] unit-test -{ } [ home "Pictures" append-path acls. ] unit-test +{ } [ "~/Pictures" acls. ] unit-test diff --git a/extra/mason/config/config.factor b/extra/mason/config/config.factor index ba6c934bcd..e7bb839f0c 100644 --- a/extra/mason/config/config.factor +++ b/extra/mason/config/config.factor @@ -6,9 +6,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 @@ -19,12 +17,12 @@ 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 diff --git a/extra/mason/release/sign/sign.factor b/extra/mason/release/sign/sign.factor index 8c3c357be6..0b8c78552f 100644 --- a/extra/mason/release/sign/sign.factor +++ b/extra/mason/release/sign/sign.factor @@ -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 ( -- ) diff --git a/extra/webapps/mason/backend/backend.factor b/extra/webapps/mason/backend/backend.factor index 54aed9433e..bc19b63d32 100644 --- a/extra/webapps/mason/backend/backend.factor +++ b/extra/webapps/mason/backend/backend.factor @@ -82,7 +82,7 @@ counter "COUNTER" { : os/cpu ( builder -- string ) [ os>> ] [ cpu>> ] bi "/" glue ; -: mason-db ( -- db ) home "mason.db" append-path ; +: mason-db ( -- db ) "~/mason.db" ; : with-mason-db ( quot -- ) mason-db [ with-transaction ] with-db ; inline diff --git a/extra/websites/concatenative/concatenative.factor b/extra/websites/concatenative/concatenative.factor index 0fa74c4949..21f6a26d02 100644 --- a/extra/websites/concatenative/concatenative.factor +++ b/extra/websites/concatenative/concatenative.factor @@ -31,7 +31,7 @@ webapps.mason.backend.watchdog websites.factorcode ; IN: websites.concatenative -: website-db ( -- db ) home "website.db" append-path ; +: website-db ( -- db ) "~/website.db" ; : init-factor-db ( -- ) mason-db [ init-mason-db ] with-db @@ -128,10 +128,10 @@ M: cgit call-responder* website-db "paste.factorcode.org" add-responder website-db "planet.factorcode.org" add-responder website-db "builds.factorcode.org" add-responder - home "docs" append-path "docs.factorcode.org" add-responder - home "gitweb" append-path "gitweb.factorcode.org" add-responder + "~/docs" "docs.factorcode.org" add-responder + "~/gitweb" "gitweb.factorcode.org" add-responder "/usr/share/cgit" "/usr/lib/cgit/cgit.cgi" "cgit.factorcode.org" add-responder - home "irclogs" append-path t >>allow-listings "irclogs.factorcode.org" add-responder + "~/irclogs" t >>allow-listings "irclogs.factorcode.org" add-responder main-responder set-global ; : ( -- config ) -- 2.34.1