]> gitweb.factorcode.org Git - factor.git/commitdiff
xdg: moving from extra/ to basis/.
authorJohn Benediktsson <mrjbq7@gmail.com>
Wed, 9 Nov 2016 05:23:22 +0000 (21:23 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Wed, 9 Nov 2016 05:23:22 +0000 (21:23 -0800)
basis/xdg/authors.txt [new file with mode: 0644]
basis/xdg/summary.txt [new file with mode: 0644]
basis/xdg/xdg.factor [new file with mode: 0644]
extra/xdg/authors.txt [deleted file]
extra/xdg/summary.txt [deleted file]
extra/xdg/xdg.factor [deleted file]

diff --git a/basis/xdg/authors.txt b/basis/xdg/authors.txt
new file mode 100644 (file)
index 0000000..e091bb8
--- /dev/null
@@ -0,0 +1 @@
+John Benediktsson
diff --git a/basis/xdg/summary.txt b/basis/xdg/summary.txt
new file mode 100644 (file)
index 0000000..ca266a0
--- /dev/null
@@ -0,0 +1 @@
+XDG Base Directory Specification
diff --git a/basis/xdg/xdg.factor b/basis/xdg/xdg.factor
new file mode 100644 (file)
index 0000000..7f12a28
--- /dev/null
@@ -0,0 +1,29 @@
+! Copyright (C) 2015 John Benediktsson
+! See http://factorcode.org/license.txt for BSD license
+
+USING: environment memoize sequences splitting ;
+
+IN: xdg
+
+! http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
+
+MEMO: xdg-data-home ( -- path )
+    "XDG_DATA_HOME" os-env [ "~/.local/share" ] when-empty ;
+
+MEMO: xdg-config-home ( -- path )
+    "XDG_CONFIG_HOME" os-env [ "~/.config" ] when-empty ;
+
+MEMO: xdg-cache-home ( -- path )
+    "XDG_CACHE_HOME" os-env [ "~/.cache" ] when-empty ;
+
+MEMO: xdg-data-dirs ( -- paths )
+    "XDG_DATA_DIRS" os-env ":" split harvest
+    [ { "/usr/local/share" "/usr/share" } ] when-empty ;
+
+MEMO: xdg-config-dirs ( -- paths )
+    "XDG_CONFIG_DIRS" os-env ":" split harvest
+    [ { "/etc/xdg" } ] when-empty ;
+
+MEMO: xdg-runtime-dir ( -- path/f )
+    "XDG_RUNTIME_DIR" os-env ;
+    ! TODO: check runtime secure permissions
diff --git a/extra/xdg/authors.txt b/extra/xdg/authors.txt
deleted file mode 100644 (file)
index e091bb8..0000000
+++ /dev/null
@@ -1 +0,0 @@
-John Benediktsson
diff --git a/extra/xdg/summary.txt b/extra/xdg/summary.txt
deleted file mode 100644 (file)
index ca266a0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-XDG Base Directory Specification
diff --git a/extra/xdg/xdg.factor b/extra/xdg/xdg.factor
deleted file mode 100644 (file)
index fd3093d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-! Copyright (C) 2015 John Benediktsson
-! See http://factorcode.org/license.txt for BSD license
-
-USING: environment sequences splitting ;
-
-IN: xdg
-
-! http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
-
-: xdg-data-home ( -- path )
-    "XDG_DATA_HOME" os-env [ "~/.local/share" ] when-empty ;
-
-: xdg-config-home ( -- path )
-    "XDG_CONFIG_HOME" os-env [ "~/.config" ] when-empty ;
-
-: xdg-cache-home ( -- path )
-    "XDG_CACHE_HOME" os-env [ "~/.cache" ] when-empty ;
-
-: xdg-data-dirs ( -- paths )
-    "XDG_DATA_DIRS" os-env ":" split harvest
-    [ { "/usr/local/share" "/usr/share" } ] when-empty ;
-
-: xdg-config-dirs ( -- paths )
-    "XDG_CONFIG_DIRS" os-env ":" split harvest
-    [ { "/etc/xdg" } ] when-empty ;
-
-: xdg-runtime-dir ( -- path/f )
-    "XDG_RUNTIME_DIR" os-env ;
-    ! TODO: check runtime secure permissions