diff options
author | Matt Singleton <matt@xcolour.net> | 2023-02-03 14:56:16 -0600 |
---|---|---|
committer | Matt Singleton <matt@xcolour.net> | 2023-02-03 14:56:16 -0600 |
commit | fb2e1a98a7ec74b8425266d2525328bc5b03e7a5 (patch) | |
tree | 08a677cc199f7960a40b28874902780fd9e082ba | |
parent | e9dc4c1090abb01317847c417b75d3960f3da34d (diff) |
clean up directory creation on non-linux
-rwxr-xr-x | deploy.sh | 13 |
1 files changed, 8 insertions, 5 deletions
@@ -20,6 +20,8 @@ fi set -u +uname=$(uname | tr '[:upper:]' '[:lower:]') + # XDG layout xcache="${XDG_CACHE_HOME:-${HOME}/.cache}" xdata="${XDG_DATA_HOME:-${HOME}/.local/share}" @@ -28,9 +30,12 @@ xconfig="${XDG_CONFIG_HOME:-${HOME}/.config}" userbin="$HOME/.local/bin" systemd="$xconfig/systemd/user" -uname=$(uname | tr '[:upper:]' '[:lower:]') - -mkdir -p "$xcache" "$xdata" "$xconfig" "$userbin" "$systemd" +mkdir -p "$xcache" "$xdata" "$xconfig" "$userbin" +mkdir -p "${xcache}/zsh" +mkdir -p "${xdata}/zsh" +if [ "linux" = "$uname" ]; then + mkdir -p "$systemd" +fi function link { link_src="$1" @@ -74,8 +79,6 @@ done cd .. # deploy to XDG dirs -mkdir -p "${xcache}/zsh" -mkdir -p "${xdata}/zsh" deploy config "$xconfig" # deploy user executables |