summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-05-29 22:57:17 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-05-29 22:57:17 -0400
commita6d337305cb46507e73296c056612d33a314300b (patch)
treea72dbad78dad0a1b6a4804c57ee65ab9ec7521ae
parent7b335d9442411d226993af47e05084c6742ca0ad (diff)
Generate .nanorc dynamicly
-rw-r--r--.git.info.exclude3
-rw-r--r--.nanorc.in (renamed from .nanorc)79
-rw-r--r--Makefile16
3 files changed, 19 insertions, 79 deletions
diff --git a/.git.info.exclude b/.git.info.exclude
index 138f882..5d469b4 100644
--- a/.git.info.exclude
+++ b/.git.info.exclude
@@ -8,6 +8,9 @@
!.*/*/*/*
!.*/*/*/*/*
+# Or Makefile
+!Makefile
+
# Ignore these for privacy
.ssh/*
.netrc
diff --git a/.nanorc b/.nanorc.in
index f150d54..b21e86b 100644
--- a/.nanorc
+++ b/.nanorc.in
@@ -1,5 +1,3 @@
-## Sample initialization file for GNU nano.
-##
## Please note that you must have configured nano with --enable-nanorc
## for this file to be read! Also note that this file should not be in
## DOS or Mac format, and that characters specially interpreted by the
@@ -233,80 +231,3 @@ set softwrap
# bind kdel backspace all
-## Nanorc files
-include "/home/luke/share/nano/nanorc.nanorc"
-
-## C/C++
-include "/home/luke/share/nano/c.nanorc"
-
-## Makefiles
-include "/home/luke/share/nano/makefile.nanorc"
-
-## Cascading Style Sheets
-include "/home/luke/share/nano/css.nanorc"
-
-## Debian files
-include "/home/luke/share/nano/debian.nanorc"
-
-## Gentoo files
-include "/home/luke/share/nano/gentoo.nanorc"
-
-## HTML
-include "/home/luke/share/nano/html.nanorc"
-
-## PHP
-include "/home/luke/share/nano/php.nanorc"
-
-## TCL
-include "/home/luke/share/nano/tcl.nanorc"
-
-## TeX
-include "/home/luke/share/nano/tex.nanorc"
-
-## Quoted emails (under e.g. mutt)
-include "/home/luke/share/nano/mutt.nanorc"
-
-## Patch files
-include "/home/luke/share/nano/patch.nanorc"
-
-## Manpages
-include "/home/luke/share/nano/man.nanorc"
-
-## Groff
-include "/home/luke/share/nano/groff.nanorc"
-
-## Perl
-include "/home/luke/share/nano/perl.nanorc"
-
-## Python
-include "/home/luke/share/nano/python.nanorc"
-
-## Ruby
-include "/home/luke/share/nano/ruby.nanorc"
-
-## Java
-include "/home/luke/share/nano/java.nanorc"
-
-## Fortran
-include "/home/luke/share/nano/fortran.nanorc"
-
-## Objective-C
-include "/home/luke/share/nano/objc.nanorc"
-
-## OCaml
-include "/home/luke/share/nano/ocaml.nanorc"
-
-## AWK
-include "/home/luke/share/nano/awk.nanorc"
-
-## Assembler
-include "/home/luke/share/nano/asm.nanorc"
-
-## Bourne shell scripts
-include "/home/luke/share/nano/sh.nanorc"
-
-## POV-Ray
-include "/home/luke/share/nano/pov.nanorc"
-
-## XML-type files
-include "/home/luke/share/nano/xml.nanorc"
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..6d28864
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,16 @@
+CHECK = $(HOME)/.prefix:$(HOME):/usr/local:/usr:/
+NANO_SHARE = $(firstword $(wildcard $(addsuffix /share/nano,$(subst :, ,$(CHECK)))))
+
+all: .nanorc
+
+.nanorc: .nanorc.in $(NANO_SHARE)
+ cat '$<' > '$@'
+ for file in $(NANO_SHARE)/*.nanorc; do echo "include \"$$file\""; done >> '$@'
+
+commit:
+ git commit -a
+
+pull:
+ git pull
+ $(MAKE)
+