Finished migrate from zplug->zgenom

This commit is contained in:
James Patrick 2024-07-10 15:31:17 -04:00
parent eaf5428821
commit e7eb0cf56e
No known key found for this signature in database

View File

@ -3,23 +3,17 @@ SRC := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
include ../lib/shared.mk include ../lib/shared.mk
ZSH_DIR := ~/.zsh ZSH_DIR := ~/.zsh
ZPLUG_DIR := ~/.zplug ZGENOM_DIR := ~/.zgenom
up: init up: init
if [ ! -d $(ZPLUG_DIR) ] ; then if [ ! -d $(ZGENOM_DIR) ] ; then
$(report) error "$(ZPLUG_DIR) doesn't exist - run init first." $(report) error "$(ZGENOM_DIR) doesn't exist - run init first."
return return
fi fi
$(report) header "Updating zplug" source $(ZGENOM_DIR)/zgenom.zsh
source $(ZPLUG_DIR)/init.zsh
source $(ZSH_DIR)/zplug
export zplugs
zplug install
zplug update ; $(report) "zplug upate"
zplug clean ; $(report) "zplug cleaned"
down: down:
rm -rf $(ZPLUG_DIR) ; $(report) "deleting zplug dir" rm -rf $(ZGENOM_DIR) ; $(report) "deleting zgenom dir"
$(rm_link) ~/.zprofile $(rm_link) ~/.zprofile
$(rm_link) ~/.zlogin $(rm_link) ~/.zlogin
$(rm_link) ~/.zshrc $(rm_link) ~/.zshrc
@ -29,7 +23,7 @@ down:
init: init:
$(info => Setting up zsh) $(info => Setting up zsh)
$(MAKE) -C $(SRC) init_zplug $(MAKE) -C $(SRC) init_zgenom
$(mk_link) $(SRC) ~/.zsh $(mk_link) $(SRC) ~/.zsh
$(mk_link) $(ZSH_DIR)/zshrc ~/.zshrc $(mk_link) $(ZSH_DIR)/zshrc ~/.zshrc
$(mk_link) $(ZSH_DIR)/zlogin ~/.zlogin $(mk_link) $(ZSH_DIR)/zlogin ~/.zlogin
@ -39,12 +33,10 @@ init:
chmod 700 $(ZSH_DIR)/cache \ chmod 700 $(ZSH_DIR)/cache \
; $(report) "updating cache permissions" ; $(report) "updating cache permissions"
init_zplug: init_zgenom:
if [ -e $(ZPLUG_DIR) ] ; then if [ -e $(ZGENOM_DIR) ] ; then
$(report) debug "zplug already installed. Skipping" $(report) debug "zgenom already installed. Skipping"
return return
fi fi
export ZPLUG_HOME=$(ZPLUG_DIR) git clone https://github.com/jandamm/zgenom.git "${HOME}/.zgenom" \
git clone https://github.com/zplug/zplug $(ZPLUG_DIR) \ ; $(report) "zgenom installed"
; $(report) "zplug installed"