From fb2e1a98a7ec74b8425266d2525328bc5b03e7a5 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Fri, 3 Feb 2023 14:56:16 -0600 Subject: clean up directory creation on non-linux --- deploy.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/deploy.sh b/deploy.sh index 675490d..313799d 100755 --- a/deploy.sh +++ b/deploy.sh @@ -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 -- cgit v1.2.3