From 0da55d9886f4959d78cdf0ee6235808d25dc2ed0 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 4 Sep 2023 20:54:32 +0900 Subject: bootstrap: move some code from setup.sh --- bootstrap.sh | 15 +++++++++++++++ setup.sh | 17 ----------------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 94cb202..72b078d 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -7,6 +7,21 @@ if [ $# != 1 ]; then exit 1 fi +( + source .zshenv + for dir in \ + "$XDG_CONFIG_HOME" \ + "$XDG_CACHE_HOME" \ + "$XDG_DATA_HOME" \ + "$XDG_STATE_HOME" \ + ; \ + do + if [ ! -d "$dir" ]; then + mkdir -p "$dir" + fi + done +) + if [ ! -d .bootstrap ]; then mkdir .bootstrap fi diff --git a/setup.sh b/setup.sh index bafa2f8..f576c29 100755 --- a/setup.sh +++ b/setup.sh @@ -21,23 +21,6 @@ if [[ $ok = 0 ]]; then exit 1 fi -# XDG Base Directories. {{{1 -( - source ~/dotfiles/.zshenv - for dir in \ - "$XDG_CONFIG_HOME" \ - "$XDG_CACHE_HOME" \ - "$XDG_DATA_HOME" \ - "$XDG_STATE_HOME" \ - ; \ - do - if [ ! -d "$dir" ]; then - echo "dir: $dir" - mkdir -p "$dir" - fi - done -) - # Configurations. {{{1 # Make symlinks to dot files. {{{2 -- cgit v1.2.3-70-g09d2