From 73d430bfb9ac222128c5cd750a61ce49e095b04c Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 8 Nov 2016 21:23:22 -0800 Subject: [PATCH] xdg: moving from extra/ to basis/. --- {extra => basis}/xdg/authors.txt | 0 {extra => basis}/xdg/summary.txt | 0 {extra => basis}/xdg/xdg.factor | 14 +++++++------- 3 files changed, 7 insertions(+), 7 deletions(-) rename {extra => basis}/xdg/authors.txt (100%) rename {extra => basis}/xdg/summary.txt (100%) rename {extra => basis}/xdg/xdg.factor (71%) diff --git a/extra/xdg/authors.txt b/basis/xdg/authors.txt similarity index 100% rename from extra/xdg/authors.txt rename to basis/xdg/authors.txt diff --git a/extra/xdg/summary.txt b/basis/xdg/summary.txt similarity index 100% rename from extra/xdg/summary.txt rename to basis/xdg/summary.txt diff --git a/extra/xdg/xdg.factor b/basis/xdg/xdg.factor similarity index 71% rename from extra/xdg/xdg.factor rename to basis/xdg/xdg.factor index fd3093d0df..7f12a28de1 100644 --- a/extra/xdg/xdg.factor +++ b/basis/xdg/xdg.factor @@ -1,29 +1,29 @@ ! Copyright (C) 2015 John Benediktsson ! See http://factorcode.org/license.txt for BSD license -USING: environment sequences splitting ; +USING: environment memoize sequences splitting ; IN: xdg ! http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html -: xdg-data-home ( -- path ) +MEMO: xdg-data-home ( -- path ) "XDG_DATA_HOME" os-env [ "~/.local/share" ] when-empty ; -: xdg-config-home ( -- path ) +MEMO: xdg-config-home ( -- path ) "XDG_CONFIG_HOME" os-env [ "~/.config" ] when-empty ; -: xdg-cache-home ( -- path ) +MEMO: xdg-cache-home ( -- path ) "XDG_CACHE_HOME" os-env [ "~/.cache" ] when-empty ; -: xdg-data-dirs ( -- paths ) +MEMO: xdg-data-dirs ( -- paths ) "XDG_DATA_DIRS" os-env ":" split harvest [ { "/usr/local/share" "/usr/share" } ] when-empty ; -: xdg-config-dirs ( -- paths ) +MEMO: xdg-config-dirs ( -- paths ) "XDG_CONFIG_DIRS" os-env ":" split harvest [ { "/etc/xdg" } ] when-empty ; -: xdg-runtime-dir ( -- path/f ) +MEMO: xdg-runtime-dir ( -- path/f ) "XDG_RUNTIME_DIR" os-env ; ! TODO: check runtime secure permissions -- 2.34.1