Ver a proveniência

Do nothing when dotfiles_dir is explicitly defined

pull/5/head
10sr há 9 anos
ascendente
cometimento
62b712a184
1 ficheiros alterados com 20 adições e 14 eliminações
  1. +20
    -14
      Makefile

+ 20
- 14
Makefile Ver ficheiro

@@ -21,20 +21,26 @@ endif

current_origin_url := $(shell git config remote.origin.url)

ifneq (,$(findstring $(dotfiles_git_path),$(current_origin_url)))
$(warning Currently in dotfiles repository)
dotfiles_dir := $(PWD)
else
ifeq (,$(dotfiles_dir))
ifeq (,$(DOTFILES_DIR))
$(warning Neigher DOTFILES_DIR nor dotfiles_dir not defined)
$(warning Use default value)
dotfiles_dir := $(home)/10sr_dotfiles
else
$(warning dotfiles_dir is set from DOTFILES_DIR)
dotfiles_dir := $(DOTFILES_DIR)
endif
endif
ifneq (,$(dotfiles_dir))

ifneq (,$(findstring $(dotfiles_git_path),$(current_origin_url)))
$(warning Currently in dotfiles repository)
dotfiles_dir := $(PWD)

else
# Current directory is not 10sr/dotfiles.git reposioty
ifeq (,$(DOTFILES_DIR))
$(warning Neigher DOTFILES_DIR nor dotfiles_dir is defined)
$(warning Use default value)
dotfiles_dir := $(home)/10sr_dotfiles
else
# dotfiles_dir is empty but DOTFILES_DIR has a value
$(warning dotfiles_dir is set from DOTFILES_DIR)
dotfiles_dir := $(DOTFILES_DIR)
endif

endif

endif

$(warning dotfiles_dir: $(dotfiles_dir))


Carregando…
Cancelar
Guardar