]> arthur.barton.de Git - ax-zsh.git/commitdiff
core: Move 20_home and 30_env to "ax-io" stage
authorAlexander Barton <alex@barton.de>
Fri, 31 Jul 2020 17:03:22 +0000 (19:03 +0200)
committerAlexander Barton <alex@barton.de>
Fri, 31 Jul 2020 17:03:22 +0000 (19:03 +0200)
This ensures that some more environment variables are already setup
before running other plugins in the "ax-io" stage.

core/20_home/20_home.ax-io [new file with mode: 0644]
core/20_home/20_home.zprofile [deleted file]
core/30_env/30_env.ax-io [new file with mode: 0644]
core/30_env/30_env.zprofile [deleted file]

diff --git a/core/20_home/20_home.ax-io b/core/20_home/20_home.ax-io
new file mode 100644 (file)
index 0000000..a07c123
--- /dev/null
@@ -0,0 +1,9 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# 20_home.ax-io: Setup (local) home directory
+
+[[ -d "/usr/local/home" && ! -d "/usr/local/home/$LOGNAME" ]] \
+       && mkdir -m 700 "/usr/local/home/$LOGNAME" >/dev/null 2>&1
+
+[[ -w "/usr/local/home/$LOGNAME" ]] \
+       && export LOCAL_HOME="/usr/local/home/$LOGNAME" \
+       || export LOCAL_HOME="$HOME"
diff --git a/core/20_home/20_home.zprofile b/core/20_home/20_home.zprofile
deleted file mode 100644 (file)
index 4bad86a..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# AX-ZSH: Alex' Modular ZSH Configuration
-# 20_home.zprofile: Setup (local) home directory
-
-[[ -d "/usr/local/home" && ! -d "/usr/local/home/$LOGNAME" ]] \
-       && mkdir -m 700 "/usr/local/home/$LOGNAME" >/dev/null 2>&1
-
-[[ -w "/usr/local/home/$LOGNAME" ]] \
-       && export LOCAL_HOME="/usr/local/home/$LOGNAME" \
-       || export LOCAL_HOME="$HOME"
diff --git a/core/30_env/30_env.ax-io b/core/30_env/30_env.ax-io
new file mode 100644 (file)
index 0000000..33a165b
--- /dev/null
@@ -0,0 +1,37 @@
+# AX-ZSH: Alex' Modular ZSH Configuration
+# 30_env.ax-io: Setup environment
+
+# Setup time zone
+if [[ -z "$TZ" && -r "/etc/timezone" ]]; then
+       TZ=$(<"/etc/timezone") export TZ
+fi
+
+# Setup XDG cache directory
+if [[ -z "$XDG_CACHE_HOME" ]]; then
+       XDG_CACHE_HOME="$LOCAL_HOME/.cache"
+fi
+if [[ ! -d "$XDG_CACHE_HOME" ]]; then
+       mkdir -p "$XDG_CACHE_HOME"
+       chmod 0700 "$XDG_CACHE_HOME"
+fi
+export XDG_CACHE_HOME
+
+# Setup XDG runtime directory
+if [[ -z "$XDG_RUNTIME_DIR" ]]; then
+       XDG_RUNTIME_DIR="${TMPDIR:-/tmp/${UID}-runtime-dir}"
+fi
+if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
+       mkdir -p "$XDG_RUNTIME_DIR"
+       chmod 0700 "$XDG_RUNTIME_DIR"
+fi
+export XDG_RUNTIME_DIR
+
+# Setup ZSH cache directory
+if [[ -z "$ZSH_CACHE_DIR" ]]; then
+       ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh"
+fi
+if [[ ! -d "$ZSH_CACHE_DIR" ]]; then
+       mkdir -p "$ZSH_CACHE_DIR"
+       chmod 0700 "$ZSH_CACHE_DIR"
+fi
+export ZSH_CACHE_DIR
diff --git a/core/30_env/30_env.zprofile b/core/30_env/30_env.zprofile
deleted file mode 100644 (file)
index 781a9ec..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-# AX-ZSH: Alex' Modular ZSH Configuration
-# 30_env.zprofile: Setup environment
-
-# Setup time zone
-if [[ -z "$TZ" && -r "/etc/timezone" ]]; then
-       TZ=$(<"/etc/timezone") export TZ
-fi
-
-# Setup XDG cache directory
-if [[ -z "$XDG_CACHE_HOME" ]]; then
-       XDG_CACHE_HOME="$LOCAL_HOME/.cache"
-fi
-if [[ ! -d "$XDG_CACHE_HOME" ]]; then
-       mkdir -p "$XDG_CACHE_HOME"
-       chmod 0700 "$XDG_CACHE_HOME"
-fi
-export XDG_CACHE_HOME
-
-# Setup XDG runtime directory
-if [[ -z "$XDG_RUNTIME_DIR" ]]; then
-       XDG_RUNTIME_DIR="${TMPDIR:-/tmp/${UID}-runtime-dir}"
-fi
-if [[ ! -d "$XDG_RUNTIME_DIR" ]]; then
-       mkdir -p "$XDG_RUNTIME_DIR"
-       chmod 0700 "$XDG_RUNTIME_DIR"
-fi
-export XDG_RUNTIME_DIR
-
-# Setup ZSH cache directory
-if [[ -z "$ZSH_CACHE_DIR" ]]; then
-       ZSH_CACHE_DIR="$XDG_CACHE_HOME/zsh"
-fi
-if [[ ! -d "$ZSH_CACHE_DIR" ]]; then
-       mkdir -p "$ZSH_CACHE_DIR"
-       chmod 0700 "$ZSH_CACHE_DIR"
-fi
-export ZSH_CACHE_DIR