summaryrefslogtreecommitdiffstats
path: root/src/lib/source/user/xdg/xdg-runtime-dir
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/source/user/xdg/xdg-runtime-dir')
-rw-r--r--src/lib/source/user/xdg/xdg-runtime-dir/down10
-rw-r--r--src/lib/source/user/xdg/xdg-runtime-dir/type1
-rw-r--r--src/lib/source/user/xdg/xdg-runtime-dir/up10
3 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/source/user/xdg/xdg-runtime-dir/down b/src/lib/source/user/xdg/xdg-runtime-dir/down
new file mode 100644
index 0000000..6a12661
--- /dev/null
+++ b/src/lib/source/user/xdg/xdg-runtime-dir/down
@@ -0,0 +1,10 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+# https://specifications.freedesktop.org/basedir-spec/latest/
+
+fdmove -c 2 1
+
+importas -Si XDG_RUNTIME_DIR
+
+rm -Rf ${XDG_RUNTIME_DIR}
diff --git a/src/lib/source/user/xdg/xdg-runtime-dir/type b/src/lib/source/user/xdg/xdg-runtime-dir/type
new file mode 100644
index 0000000..bdd22a1
--- /dev/null
+++ b/src/lib/source/user/xdg/xdg-runtime-dir/type
@@ -0,0 +1 @@
+oneshot
diff --git a/src/lib/source/user/xdg/xdg-runtime-dir/up b/src/lib/source/user/xdg/xdg-runtime-dir/up
new file mode 100644
index 0000000..518e994
--- /dev/null
+++ b/src/lib/source/user/xdg/xdg-runtime-dir/up
@@ -0,0 +1,10 @@
+#!@shebangdir@/execlineb -P
+
+# ISC license.
+# https://specifications.freedesktop.org/basedir-spec/latest/
+
+fdmove -c 2 1
+
+importas -Si XDG_RUNTIME_DIR
+
+if { mkdir -p -m700 -- ${XDG_RUNTIME_DIR} }