icebarf / dotmg

.gitignore entry generation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dotmg

Introduction

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.

Getting Help

Please read the provided manual pages or the org document.

$ man 1 dotmg

Commands

  • dotmg add file[s]|directory[ies]: Add the specified arg to not be ignored by git.
  • dotmg init: Initialises a git repository in $HOUSE. Writes a base .gitignore that ignores everything in that directory.
  • dotmg init-gitignore: Writes only a base .gitignore in current directory.
  • dotmg clean-newlines: Cleans up any empty newlines that may be present in .gitignore in the current directory.

Installation

Install Everything at default location

make installs dotmg and manual pages in relevant directories inside /usr/

# make all

Default Install

# make install

Different Prefix

# PREFIX=/usr/local make install

Install manual pages as well

# make install-man

Specify destination directory

This is useful for package managers or installing to a non-~/~ (root) directory.

$ DESTDIR=$HOME/.local/ PREFIX=/usr/bin make install

The uninstall target works the same way as the install target but deletes the dotmg script.

Details

What is $HOUSE?

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.

About

.gitignore entry generation

License:GNU General Public License v3.0


Languages

Language:Shell 92.6%Language:Makefile 7.4%