X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=sugar.git;a=blobdiff_plain;f=GNUmakefile;h=86d0c9f97c2e12c36f5607da3287b4d0f02cc14d;hp=5fa12308cc9cde3d1d9f7cb5d9bcfd560740ddf6;hb=176019f33f06ef45e85357dcd72a1b81a9c5a82d;hpb=5a4ae2f676698eb4c47e399858b7459269bf3fae diff --git a/GNUmakefile b/GNUmakefile index 5fa1230..86d0c9f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -3,14 +3,19 @@ help: @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 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 current dot files with the repository." @echo " make import FILES=" - @echo " - import the dot files into the repository" + @echo " - import dot files into the repository." + @echo " make import-all" + @echo " - import every uncontrolled dot files, which aren't" + @echo " ignored, into the repository." + @echo " make export FILES=" + @echo " - export dot files from the repository." @echo " make diff FILE=" - @echo " - show diff of the dot file" + @echo " - show diff of the dot file." @echo lint: @@ -23,7 +28,7 @@ update: git pull perl ./tools/list-files.pl | perl ./tools/update.pl perl ./tools/list-files.pl | perl ./tools/find-outdated.pl - git status + -git status commit: git add -A @@ -41,10 +46,29 @@ import: @exit 1 else import: - perl ./tools/import.pl $(FILES) + (for i in $(FILES); do echo $$i; done) | perl ./tools/import.pl -git status endif +import-all: + perl ./tools/list-files.pl | \ + perl ./tools/find-missing.pl | \ + cut -b 3- | \ + perl ./tools/import.pl + -git status + +ifeq ($(FILES),) +export: + @echo "Specify at least one file." + @echo "Usage: $(MAKE) export FILES=" + @exit 1 +else +export: + @echo $(FILES) | \ + tr -s " " "\n" | \ + perl ./tools/export.pl +endif + ifeq ($(FILE),) diff: @echo "Specify one file." @@ -55,4 +79,4 @@ diff: perl ./tools/diff.pl $(FILE) | $(PAGER) endif -.PHONY: help lint update commit install import diff +.PHONY: help lint update commit install import export diff