commit
77449b95d9
42
Makefile
42
Makefile
|
@ -1,9 +1,13 @@
|
||||||
UNAME_INSTALL=install-$(shell uname -s)
|
XDG_CONFIG_HOME=$(HOME)/.config
|
||||||
|
XDG_CACHE_HOME=$(HOME)/.cache
|
||||||
|
ZSH_CONFIG=$(XDG_CONFIG_HOME)/zsh
|
||||||
|
ZSH_CACHE=$(XDG_CACHE_HOME)/zsh
|
||||||
|
ZSH_LOCAL=$(HOME)/.local
|
||||||
|
|
||||||
update:
|
update:
|
||||||
git submodule foreach git pull
|
git submodule foreach git pull
|
||||||
|
|
||||||
install: install-externals install-core $(UNAME_INSTALL)
|
install: install-externals install-core
|
||||||
|
|
||||||
install-core:
|
install-core:
|
||||||
@echo "Core install tasks."
|
@echo "Core install tasks."
|
||||||
|
@ -11,31 +15,23 @@ install-core:
|
||||||
@!(ls $(HOME)/.zshrc > /dev/null 2> /dev/null) || mv $(HOME)/.zshrc $(PWD)/zshrc.bak # Make backup of -zshrc if necessary
|
@!(ls $(HOME)/.zshrc > /dev/null 2> /dev/null) || mv $(HOME)/.zshrc $(PWD)/zshrc.bak # Make backup of -zshrc if necessary
|
||||||
@echo "Creating .zshrc in your home directory..."
|
@echo "Creating .zshrc in your home directory..."
|
||||||
@ln -s $(PWD)/zshrc $(HOME)/.zshrc # update the link to .zshrc
|
@ln -s $(PWD)/zshrc $(HOME)/.zshrc # update the link to .zshrc
|
||||||
@echo "Creating .zsh directory in your home directoy iff neccessary..."
|
@echo "Creating directories..."
|
||||||
@ls $(HOME)/.zsh > /dev/null 2> /dev/null || ln -s $(PWD) $(HOME)/.zsh # Create .zsh dir link if not existing
|
@mkdir -p $(XDG_CONFIG_HOME)
|
||||||
@echo "Creating $(HOME)/.local/share iff neccessary (for autojump errors)..."
|
@mkdir -p $(ZSH_CACHE)
|
||||||
@mkdir -p $(HOME)/.local/share # Autojump writes to this dir if existing (otherwise we get a autojump_erros file)
|
@mkdir -p $(ZSH_LOCAL)/bin
|
||||||
|
@mkdir -p $(ZSH_LOCAL)/share
|
||||||
|
@echo "Creating zsh directory in your .config directory iff neccessary..."
|
||||||
|
@(ls $(ZSH_CONFIG) > /dev/null 2> /dev/null) || ln -s $(PWD) $(ZSH_CONFIG) # Create zsh dir link if not existin
|
||||||
@echo "Creating functions.d directory iff neccessary (for autocompletion files)..."
|
@echo "Creating functions.d directory iff neccessary (for autocompletion files)..."
|
||||||
@mkdir -p $(PWD)/functions.d # folder for autocompletion files
|
@mkdir -p functions.d # folder for autocompletion files
|
||||||
|
@echo "Creating autojump link"
|
||||||
|
@(ls $(ZSH_LOCAL)/bin/autojump > /dev/null 2> /dev/null) || ln -s $(PWD)/autojump/autojump $(ZSH_LOCAL)/bin/autojump
|
||||||
@echo "Copying autojump autocompletion script..."
|
@echo "Copying autojump autocompletion script..."
|
||||||
@cp -f $(PWD)/autojump/_j $(PWD)/functions.d/_j
|
@cp -f autojump/_j functions.d/_j
|
||||||
@echo "Creating custom user files iff neccessary..."
|
@echo "Creating custom user files iff neccessary..."
|
||||||
@touch history private.zsh # create custom files for users
|
@touch private.zsh # create custom files for users
|
||||||
@echo "DONE with core install tasks."
|
@echo "DONE with core install tasks."
|
||||||
|
|
||||||
install-externals:
|
install-externals:
|
||||||
git submodule init
|
git submodule update --init
|
||||||
git submodule update
|
|
||||||
|
|
||||||
install-Darwin:
|
|
||||||
@echo "Darwin specific install tasks."
|
|
||||||
@echo "Creating $(HOME)/bin directory iff neccessary..."
|
|
||||||
@ls $(HOME)/bin 2>&1> /dev/null || (mkdir -p $(HOME)/bin && SetFile -a "V" $(HOME)/bin)
|
|
||||||
@echo "Copying autojump to bin directory..."
|
|
||||||
@ln -sf $(PWD)/autojump/autojump $(HOME)/bin/autojump
|
|
||||||
@echo "DONE with Darwin install tasks."
|
|
||||||
|
|
||||||
install-Linux:
|
|
||||||
@echo "Linux specific install tasks."
|
|
||||||
@echo "DONE."
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue