Update file provision.sh

This commit is contained in:
Brian Zalewski 2023-01-10 04:37:55 +00:00
parent 251f5aeda9
commit 46183113f5

View file

@ -382,17 +382,21 @@ else
chown -Rf "$USER":"$(id -g -n)" /usr/local/src/hiawatha chown -Rf "$USER":"$(id -g -n)" /usr/local/src/hiawatha
fi fi
rsyncChezmoiFiles() {
rsync -rtvu --delete /usr/local/src/hiawatha/docs/ "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/docs/" &
rsync -rtvu --delete /usr/local/src/hiawatha/home/ "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/home/" &
rsync -rtvu --delete /usr/local/src/hiawatha/system/ "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/system/" &
rsync -rtvu /usr/local/src/hiawatha/.chezmoiignore "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/.chezmoiignore" &
rsync -rtvu /usr/local/src/hiawatha/.chezmoiroot "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/.chezmoiroot" &
rsync -rtvu /usr/local/src/hiawatha/software.yml "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/software.yml" &
wait
logg success 'Successfully updated the ~/.local/share/chezmoi folder with changes from the upstream repository'
}
### Copy files to HOME folder with rsync ### Copy files to HOME folder with rsync
logg info 'Copying files from /usr/local/src/hiawatha to the HOME directory via rsync' logg info 'Copying files from /usr/local/src/hiawatha to the HOME directory via rsync'
mkdir -p "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi" mkdir -p "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi"
rsync -rtvu --delete /usr/local/src/hiawatha/docs/ "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/docs/" & rsyncChezmoiFiles
rsync -rtvu --delete /usr/local/src/hiawatha/home/ "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/home/" &
rsync -rtvu --delete /usr/local/src/hiawatha/system/ "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/system/" &
rsync -rtvu /usr/local/src/hiawatha/.chezmoiignore "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/.chezmoiignore" &
rsync -rtvu /usr/local/src/hiawatha/.chezmoiroot "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/.chezmoiroot" &
rsync -rtvu /usr/local/src/hiawatha/software.yml "${XDG_DATA_DIR:-$HOME/.local/share}/chezmoi/software.yml" &
logg success 'Successfully updated the ~/.local/share/chezmoi folder with changes from the upstream repository'
### Ensure ~/.local/bin files are executable ### Ensure ~/.local/bin files are executable
logg info 'Ensuring scripts in ~/.local/bin are executable' logg info 'Ensuring scripts in ~/.local/bin are executable'
find "$HOME/.local/bin" -maxdepth 1 -mindepth 1 -type f | while read -r BINFILE; do find "$HOME/.local/bin" -maxdepth 1 -mindepth 1 -type f | while read -r BINFILE; do