From e519c71ce0eca986b636143f30822a2fe60d35b6 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 05 Mar 2016 03:32:15 -0500 Subject: bin/dfmk: Initialize gitignore file --- (limited to 'bin/dfmk') diff --git a/bin/dfmk b/bin/dfmk index 4a87feb..5588c84 100755 --- a/bin/dfmk +++ b/bin/dfmk @@ -16,6 +16,20 @@ for repo in "${@}"; do # Initialize repository vcsh init "${repo}" vcsh "${repo}" remote add origin "$(printf "${REPO_FMT}" "${repo}")" + cat >"${HOME}/.gitignore.d/${repo}" <<-EOF + # Exclude all files + * + + # Include relevant files + !/.gitignore.d/ + !/.gitignore.d/${repo} + + # Exclude swap and backup files + *.s[a-w]? + *.vim + *~ + *.orig + EOF # Add repository to mr.git cat >"${HOME}/.config/mr/available.d/${repo}.vcsh" <<-EOF -- cgit v0.9.1