X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=sugar.git;a=blobdiff_plain;f=GNUmakefile;h=86d0c9f97c2e12c36f5607da3287b4d0f02cc14d;hp=1d927bfb50eefaf8792a3452f8be0796f45380d6;hb=HEAD;hpb=684156f7eae29ace1183e8ec570169d3ab6dc61e diff --git a/GNUmakefile b/GNUmakefile index 1d927bf..86d0c9f 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -6,12 +6,14 @@ help: @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 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 @@ -44,7 +46,7 @@ import: @exit 1 else import: - (for i in $(FILES); do echo $i; done) | perl ./tools/import.pl + (for i in $(FILES); do echo $$i; done) | perl ./tools/import.pl -git status endif @@ -55,6 +57,18 @@ import-all: 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." @@ -65,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