[DO NOT UPDATE] Prepare for file structure changes

This commit is contained in:
JeremyStar™ 2024-06-02 21:16:17 +02:00
parent 881a79f4e8
commit 07d47ec389
Signed by: JeremyStarTM
GPG key ID: E366BAEF67E4704D
2 changed files with 73 additions and 1 deletions

View file

@ -5,13 +5,16 @@ cd "${HOME}/.dotfiles" || (
) )
# Define updater version # Define updater version
UPDATER_VERSION=2 UPDATER_VERSION=3
case "${STAGE}" in case "${STAGE}" in
1) 1)
echo ":: 1 | Unlinking files" echo ":: 1 | Unlinking files"
./uninstall.sh ./uninstall.sh
[[ -z "${UPDATER_VERSION}" ]] || [[ ! "${UPDATER_VERSION}" -gt "2" ]] &&
./uninstall.sh --remove-legacy-paths
echo ":: 1 | Linking files" echo ":: 1 | Linking files"
./install.sh ./install.sh

View file

@ -15,6 +15,75 @@ function unlink() {
# install bit # install bit
[[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "$HOME/.config/.jstm_dotfiles" [[ -n "$REMOVE_INSTALLBIT" ]] && rm -rf "$HOME/.config/.jstm_dotfiles"
for arg in "${@}"; do
case "${arg}" in
"--remove-legacy-paths")
echo ":: Unlinking legacy paths"
declare -a legacypaths=(
".local/bin/jobrunner"
".local/bin/jobrunner-runjob"
".jstmbash"
".config/jstmbash.env"
".config/starship.toml"
".bashrc"
".config/hypr"
".config/waybar"
".config/fnott"
".config/eww"
".config/xdg-desktop-portal/hyprland-portals.conf"
".config/neofetch"
".config/btop"
".local/share/mc"
".config/mc"
".config/mpv"
".config/GIMP/2.10/splashes"
".config/gitui"
".local/share/mc/skins/dracula.ini"
".local/share/mc/skins/dracula256.ini"
".config/nwg-look"
".config/qt5ct"
".config/qt6ct"
".config/Kvantum"
".icons"
".local/share/icons"
".fonts"
".config/fontconfig"
".local/share/wallpapers"
".local/share/plasma"
".config/kdedefaults"
".local/share/color-schemes"
".local/share/aurorae"
".config/kglobalshortcutsrc"
".config/kiorc"
".config/krunnerrc"
".config/kservicemenurc"
".config/ksplashrc"
".config/ktimezonedrc"
".config/plasma-localrc"
".config/plasma-org.kde.plasma.deskop-appletsrc"
".config/konsolerc"
".local/share/konsole"
".config/dolphinrc"
".local/bin/dotfiles-updatechecker"
".local/bin/dotfiles-updater"
".local/bin/dotfiles-install-software"
".config/copyq"
)
for path in "${legacypaths[@]}"; do
unlink "${path}"
done
echo ":: Unlinked legacy paths"
exit 1
;;
*)
echo ":: Warning: Unknown argument \"${arg}\""
;;
esac
done
# jobrunner # jobrunner
unlink ".local/bin/jobrunner" unlink ".local/bin/jobrunner"
unlink ".local/bin/jobrunner-runjob" unlink ".local/bin/jobrunner-runjob"