install.fairie/system/usr/local/share/run_onchange_after_setup-share-folder
Brian Zalewski e58f91cb9e Update 9 files
- /home/dot_local/bin/run_onchange_ensure-executable.tmpl
- /home/dot_local/share/ansible/run_onchange_after_symlink-ansible-configs.tmpl
- /home/dot_ssh/run_onchanges_after_ensure-private-key.tmpl
- /home/dot_ssh/run_onchanges_after_generate-public-keys.tmpl
- /home/Library/Fonts/run_onchange_after_add-fonts.tmpl
- /system/usr/share/run_onchange_after_setup-share-folder
- /system/usr/local/share/run_onchange_after_setup-share-folder
- /system/var/log/user/run_onchange_after-symlink-user-logs
- /system/etc/default/modify_grub
2022-12-25 09:09:00 +00:00

27 lines
992 B
Bash

#!/usr/bin/env bash
{{ includeTemplate "universal/profile" }}
{{ includeTemplate "universal/logg" }}
logg info 'Ensure /usr/local/share is a directory'
sudo mkdir -p /usr/local/share
logg info 'Clean up old theme files'
for ITEM_TO_BE_REMOVED of "/usr/share/backgrounds/images" "/usr/share/backgrounds/f32" "/usr/share/backgrounds/qubes" "/usr/share/wallpapers"; do
if [ -d "$ITEM_TO_BE_REMOVED" ] || [ -f "$ITEM_TO_BE_REMOVED" ]; then
logg info "Removing $ITEM_TO_BE_REMOVED"
sudo rm -rf "$ITEM_TO_BE_REMOVED"
fi
fi
logg info 'Copy /usr/local/src/{{ .theme }}/share to /usr/local/share'
sudo cp -rf /usr/local/src/{{ .theme }}/share/ /usr/local/share
logg info 'Converting all symlinks to equivalent regular files'
sudo find /usr/local/src -type l -exec squash-symlink {} +
logg info 'Ensure /boot/grub2/themes is a directory'
sudo mkdir -p /boot/grub2/themes
logg info 'Copy GRUB themes to /boot/grub2/themes'
sudo cp -rf /usr/local/share/grub/themes/ /boot/grub2/themes