This is a simple bash program that automates the generation and
management of a .gitignore file in order to make it
easier for those who keep their $HOME as a git repository
and bother with manually adding/removing listings.
Please read the provided manual pages or the org document.
$ man 1 dotmg
dotmg add file[s]|directory[ies]: Add the specified arg to not be ignored bygit.dotmg init: Initialises a git repository in$HOUSE. Writes a base.gitignorethat ignores everything in that directory.dotmg init-gitignore: Writes only a base.gitignorein current directory.dotmg clean-newlines: Cleans up any empty newlines that may be present in.gitignorein the current directory.
make installs dotmg and manual pages in relevant
directories inside /usr/
# make all
# make install
# PREFIX=/usr/local make install
# make install-man
This is useful for package managers or installing to a non-~/~ (root) directory.
$ DESTDIR=$HOME/.local/ PREFIX=/usr/bin make install
The
uninstalltarget works the same way as the install target but deletes thedotmgscript.
The $HOUSE variable is an internally-used variable that affects where dotmg will operate. If it is not set by the user, it defaults to $HOME.
The commands init-gitignore and clean-newlines are exceptions to this variable. They operate in the directory where the command is executed.