From 1cc398b1c51c3b19188580074250482b04493d88 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 18 Jun 2022 16:50:54 -0700 Subject: [PATCH] Revert "use tilde paths in more places." This reverts commit 844060a7d003ae6921f113aceadae67209275455. --- .../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, 18 insertions(+), 14 deletions(-) diff --git a/basis/editors/visual-studio-code/visual-studio-code.factor b/basis/editors/visual-studio-code/visual-studio-code.factor index 867a3c42e6..3cd1267f4c 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 ] - [ "~/VSCode-linux-x64/Code" ] + [ home "VSCode-linux-x64/Code" append-path ] [ "/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 5575c5b417..779214939f 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 prepend-path scaffold-file ; + [ home ] dip append-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 b2744af4b9..7f6eaa62f6 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 [ - "~/roms" dup file-exists? [ drop f ] unless + home "roms" append-path 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 9a65acb364..e3942e2b6f 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 -{ } [ "~/Pictures" acls. ] unit-test +{ } [ home "Pictures" append-path acls. ] unit-test diff --git a/extra/mason/config/config.factor b/extra/mason/config/config.factor index e7bb839f0c..ba6c934bcd 100644 --- a/extra/mason/config/config.factor +++ b/extra/mason/config/config.factor @@ -6,7 +6,9 @@ IN: mason.config ! (Optional) Location for build directories SYMBOL: builds-dir -builds-dir [ "~/builds" ] initialize +builds-dir get-global [ + home "builds" append-path builds-dir set-global +] unless ! Who sends build report e-mails. SYMBOL: builder-from @@ -17,12 +19,12 @@ SYMBOL: builder-recipients ! (Optional) CPU architecture to build for. SYMBOL: target-cpu -target-cpu [ cpu ] initialize +target-cpu get-global [ cpu target-cpu set-global ] unless ! (Optional) OS to build for. SYMBOL: target-os -target-os [ os ] initialize +target-os get-global [ os target-os set-global ] unless ! (Optional) Architecture variant suffix. SYMBOL: target-variant diff --git a/extra/mason/release/sign/sign.factor b/extra/mason/release/sign/sign.factor index 0b8c78552f..8c3c357be6 100644 --- a/extra/mason/release/sign/sign.factor +++ b/extra/mason/release/sign/sign.factor @@ -19,9 +19,11 @@ HOOK: cert-path os ( -- path/f ) M: object cert-path f ; -M: macosx cert-path "~/config/mac_app.cer" ; +M: macosx cert-path + home "config/mac_app.cer" append-path ; -M: windows cert-path "~/config/FactorSPC.pfx" ; +M: windows cert-path + home "config/FactorSPC.pfx" append-path ; >> HOOK: sign-factor-app os ( -- ) diff --git a/extra/webapps/mason/backend/backend.factor b/extra/webapps/mason/backend/backend.factor index bc19b63d32..54aed9433e 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 ) "~/mason.db" ; +: mason-db ( -- db ) home "mason.db" append-path ; : 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 21f6a26d02..0fa74c4949 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 ) "~/website.db" ; +: website-db ( -- db ) home "website.db" append-path ; : 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 - "~/docs" "docs.factorcode.org" add-responder - "~/gitweb" "gitweb.factorcode.org" add-responder + home "docs" append-path "docs.factorcode.org" add-responder + home "gitweb" append-path "gitweb.factorcode.org" add-responder "/usr/share/cgit" "/usr/lib/cgit/cgit.cgi" "cgit.factorcode.org" add-responder - "~/irclogs" t >>allow-listings "irclogs.factorcode.org" add-responder + home "irclogs" append-path t >>allow-listings "irclogs.factorcode.org" add-responder main-responder set-global ; : ( -- config ) -- 2.34.1