From b9d8a7064edaceb5d040804ced10db9a4e57e1b0 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sun, 19 Mar 2023 19:45:57 +0100 Subject: [PATCH] Update sync with files --- Makefile | 62 +++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 0016b8b..cee0027 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,9 @@ # Version control -VC = git +VC = git + +# Downloaders +WGET = wget -q --show-progress +CURL = curl -s # Hide some verbose messages from Make MAKEFLAGS += --no-print-directory @@ -8,7 +12,9 @@ all: full-sync # Pull latest changes refresh: + @echo Pull latest changes from repository... @$(VC) pull + @echo # Pull and sync full-sync: @@ -19,39 +25,71 @@ full-sync: # .config sync-dotconfig: +# Fish @mkdir -p $(HOME)/.config/fish/conf.d @mkdir -p $(HOME)/.config/fish/functions + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/functions/fish_prompt.fish -O $(HOME)/.config/fish/functions/fish_prompt.fish + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/promp_color.fish -O $(HOME)/.config/fish/conf.d/promp_color.fish + + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr.fish -O $(HOME)/.config/fish/conf.d/abbr.fish + +# Micro + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/micro/settings.json -O $(HOME)/.config/micro/settings.json + +# END @echo .config directory synced! + @echo # .emacs.d sync-emacs: + @mkdir -p $(HOME)/.emacs.d + + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.emacs.d/init.el -O $(HOME)/.emacs.d/init.el + +# END @echo Emacs config synced! + @echo # .mozilla sync-mozilla: +# END @echo Firefox config synced! + @echo -# .unison -sync-unison: - @echo Unison preferences synced! +# .dotfiles +sync-dotfiles: +# .gitconfig + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.gitconfig -O $(HOME)/.gitconfig +# .ocamlformat + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.ocamlformat -O $(HOME)/.ocamlformat + +# .clang-format + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/dotfiles/.clang-format -O $(HOME)/.clang-format + +# End + @echo dotfiles synced! + @echo # === Specific platforms == sync: + @$(MAKE) sync-dotconfig + @$(MAKE) sync-dotfiles + @$(MAKE) sync-emacs ifeq ($(shell grep -c "archlinux" /proc/version), 1) # Arch - @$(MAKE) sync-dotconfig - - - @$(MAKE) sync-emacs @$(MAKE) sync-mozilla else ifeq ($(shell grep -c "WSL" /proc/version), 1) # WSL - @$(MAKE) sync-dotconfig + @mkdir -p $(HOME)/.unison + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.unison/default.prf -O $(HOME)/.unison/default.prf - - @$(MAKE) sync-emacs - @$(MAKE) sync-unison +# Specific + @$(WGET) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/config_wsl.fish -O $(HOME)/.config/fish/config.fish_prompt + @$(CURL) https://git.mylloon.fr/Anri/confOS/raw/branch/main/.config/fish/conf.d/abbr_wsl.fish >> $(HOME)/.config/fish/conf.d/abbr.fish endif + +# END + @echo 🎉 Sync complete!