]> gitweb @ CieloNegro.org - sugar.git/blob - GNUmakefile
Auto commit by The Sugar System.
[sugar.git] / GNUmakefile
1 help:
2         @echo
3         @echo "  .:. Sugar - The Dot-Files Manager .:."
4         @echo
5         @echo "Usage:"
6         @echo "  make lint    - lint The Sugar System."
7         @echo "  make update  - update repository with the current dot files."
8         @echo "  make commit  - commit changes to the repository."
9         @echo "  make install - update the current dot files with the repository."
10         @echo "  make import FILES=<FILES>"
11         @echo "               - import the dot files into the repository."
12         @echo "  make import-all"
13         @echo "               - import every uncontrolled dot files, which aren't"
14         @echo "                 ignored, into the repository."
15         @echo "  make diff FILE=<FILE>"
16         @echo "               - show diff of the dot file."
17         @echo
18
19 lint:
20         perl ./tools/list-files.pl | perl ./tools/find-missing.pl
21         perl ./tools/list-files.pl | perl ./tools/find-outdated.pl
22         perl ./tools/list-files.pl | perl ./tools/find-changed.pl
23         -git status
24
25 update:
26         git pull
27         perl ./tools/list-files.pl | perl ./tools/update.pl
28         perl ./tools/list-files.pl | perl ./tools/find-outdated.pl
29         -git status
30
31 commit:
32         git add -A
33         git commit -m 'Auto commit by The Sugar System.'
34         git push
35         git log --stat --unified -1 --color
36
37 install: lint
38         perl ./tools/list-files.pl | perl ./tools/install.pl
39
40 ifeq ($(FILES),)
41 import:
42         @echo "Specify at least one file."
43         @echo "Usage: make import FILES=<FILES>"
44         @exit 1
45 else
46 import:
47         (for i in $(FILES); do echo $$i; done) | perl ./tools/import.pl
48         -git status
49 endif
50
51 import-all:
52         perl ./tools/list-files.pl | \
53                 perl ./tools/find-missing.pl | \
54                 cut -b 3- | \
55                 perl ./tools/import.pl
56         -git status
57
58 ifeq ($(FILE),)
59 diff:
60         @echo "Specify one file."
61         @echo "Usage: make diff FILE=<FILE>"
62         @exit 1
63 else
64 diff:
65         perl ./tools/diff.pl $(FILE) | $(PAGER)
66 endif
67
68 .PHONY: help lint update commit install import diff