]> gitweb @ CieloNegro.org - sugar.git/blobdiff - GNUmakefile
Auto commit by The Sugar System.
[sugar.git] / GNUmakefile
index ca56c8862d4bcd61b07a2c62a7cc21386a31926d..5fa12308cc9cde3d1d9f7cb5d9bcfd560740ddf6 100644 (file)
@@ -1,7 +1,23 @@
+help:
+       @echo
+       @echo "  .:. Sugar - The Dot-Files Manager .:."
+       @echo
+       @echo "Usage:"
+       @echo "  make lint    - lint The Sugar System"
+       @echo "  make update  - update repository with the current dot files"
+       @echo "  make commit  - commit changes to the repository"
+       @echo "  make install - update the current dot files with the repository"
+       @echo "  make import FILES=<FILES>"
+       @echo "               - import the dot files into the repository"
+       @echo "  make diff FILE=<FILE>"
+       @echo "               - show diff of the dot file"
+       @echo
+
 lint:
        perl ./tools/list-files.pl | perl ./tools/find-missing.pl
        perl ./tools/list-files.pl | perl ./tools/find-outdated.pl
        perl ./tools/list-files.pl | perl ./tools/find-changed.pl
+       -git status
 
 update:
        git pull
@@ -18,4 +34,25 @@ commit:
 install: lint
        perl ./tools/list-files.pl | perl ./tools/install.pl
 
-.PHONY: lint update commit install
+ifeq ($(FILES),)
+import:
+       @echo "Specify at least one file."
+       @echo "Usage: make import FILES=<FILES>"
+       @exit 1
+else
+import:
+       perl ./tools/import.pl $(FILES)
+       -git status
+endif
+
+ifeq ($(FILE),)
+diff:
+       @echo "Specify one file."
+       @echo "Usage: make diff FILE=<FILE>"
+       @exit 1
+else
+diff:
+       perl ./tools/diff.pl $(FILE) | $(PAGER)
+endif
+
+.PHONY: help lint update commit install import diff