Skip to content

Commit

Permalink
Merge pull request #18 from alexanderjeurissen/13/add_update_notice_c…
Browse files Browse the repository at this point in the history
…omment

Update makefile to include copy for devicons linemode repo
  • Loading branch information
alexanderjeurissen authored Feb 27, 2018
2 parents 7dc9645 + f823208 commit 4bcf7f1
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
RANGER_DIR=$(if $(XDG_CONFIG_HOME),$(XDG_CONFIG_HOME),$(HOME)/.config)/ranger
PLUGIN_DIR=$(RANGER_DIR)/plugins
RC_FILE=$(RANGER_DIR)/rc.conf
DEVICONS_IN_RC="default_linemode devicons"

define newline


endef

define DEVICONS_NOTICE
# a plugin that adds file glyphs / icon support to Ranger:
# https://github.com/alexanderjeurissen/ranger_devicons
default_linemode devicons
endef

DEVICONS_IN_RC=$(subst $(newline),\n,${DEVICONS_NOTICE})

install:
install -d $(PLUGIN_DIR)
install -b devicons.py $(RANGER_DIR)/devicons.py
install -b devicons_linemode.py $(PLUGIN_DIR)/devicons_linemode.py
grep -q $(DEVICONS_IN_RC) $(RC_FILE) || echo $(DEVICONS_IN_RC) >> $(RC_FILE)
grep -q 'default_linemode devicons' $(RC_FILE) || echo '$(DEVICONS_IN_RC)' >> $(RC_FILE)

uninstall:
$(RM) $(RANGER_DIR)/devicons.py
Expand Down

0 comments on commit 4bcf7f1

Please sign in to comment.