diff options
| author | Craig Jennings <c@cjennings.net> | 2025-05-23 15:36:35 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2025-05-23 15:36:35 -0500 |
| commit | c1d07a7e5463d26a4a7fdfd5135380edafe7e1ad (patch) | |
| tree | f24d2f682f4c102dffae02a7001e311e75aab386 /archsetup | |
| parent | 9f6baa444e51c6decf93785a5a49c3d27707cb41 (diff) | |
stow dotfiles from subdirectory
Diffstat (limited to 'archsetup')
| -rwxr-xr-x | archsetup | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -23,12 +23,13 @@ username="cjennings" password="welcome" # will be changed on first login. :) +archsetup_dir="$(dirname "$(readlink -f "$0")")" +dotfiles_dir="$archsetup_dir/dotfiles" + dwm_repo="https://git.cjennings.net/dwm.git" dmenu_repo="https://git.cjennings.net/dmenu.git" st_repo="https://git.cjennings.net/st.git" -dotfiles_repo="https://git.cjennings.net/dotfiles" dotemacs_repo="https://git.cjennings.net/dotemacs.git" -dotfiles_home="/home/$username/.dotfiles" logfile="/var/log/archsetup-$(date +'%Y-%m-%d-%H-%M-%S').log" source_dir="/home/$username/.local/src" # aur/git source goes here @@ -289,16 +290,12 @@ create_user () { user_customizations() { action="User Customizations" && display "title" "$action" - action="cloning dotfiles" && display "task" "$action" - (git clone --depth 1 $dotfiles_repo "$dotfiles_home" \ - >> "$logfile" 2>&1) || error "error" "$action" "$?" - - action="moving dotfiles into place" && display "task" "$action" - (cd "$dotfiles_home" && stow --no-folding --adopt system \ + action="linking dotfiles into place" && display "task" "$action" + (cd $dotfiles_dir && stow --target=/home/$username --no-folding --adopt system \ >> "$logfile" 2>&1 ) || error "error" "$action" "$?" action="restoring dotfile versions" && display "task" "$action" - (cd "$dotfiles_home" && git restore . \ + (cd "$dotfiles_dir" && git restore . \ >> "$logfile" 2>&1 ) || error "error" "$action" "$?" action="creating common directories" && display "task" "$action" |
