Browse Source

Add file targets

pull/5/head
10sr 10 years ago
parent
commit
7668e945e2
1 changed files with 18 additions and 1 deletions
  1. +18
    -1
      Makefile

+ 18
- 1
Makefile View File

@@ -5,9 +5,10 @@

home ?= $(HOME)

dotfiles_url_base := https://raw.githubusercontent.com/10sr/dotfiles/master/
dotfiles_url_base := https://raw.githubusercontent.com/10sr/dotfiles/master
dotfiles_git := git@github.com:10sr/dotfiles.git
dotfiles_git_pub := http://github.com/10sr/dotfiles.git
use_git ?= t

ifeq (,$(dotfiles_dir))
ifeq (,$(DOTFILES_DIR))
@@ -107,6 +108,22 @@ endif



# preparing files
# ===============

ifeq (,$(use_git))
$(warning 'use_git' is set to empty. Use curl to fetch files)
$(dotfiles_dir)/%:
mkdir -vp $(dotfiles_dir)
curl --url $(dotfiles_url_base)/$* --output $@
else
$(warning 'use_git' is set to non-empty. Use git to fetch files)
$(dotfiles_dir)/%: $(dotfiles_dir)/.git
test -f "$@"
endif



# setups
# ======



Loading…
Cancel
Save