From 42cf7cc8ce9ab16df8ea64583ee637ef3326c8f0 Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sun, 31 Jul 2016 17:04:31 +0200 Subject: [PATCH] add script to find non-versioned files --- bin/ls-non-config | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 bin/ls-non-config diff --git a/bin/ls-non-config b/bin/ls-non-config new file mode 100755 index 0000000..57e0cf7 --- /dev/null +++ b/bin/ls-non-config @@ -0,0 +1,13 @@ +#!/bin/bash + +EXCLUDE="(.git|workspaces|.cache|.gimme|.cfg|gocode|.local|logs|.gnupg/.*.(gpg|key))" + +NON_CONFIG=$(find ${HOME} -type f | grep -vE ${EXCLUDE}) + +for repo in public secret; do + for managed in $(git --git-dir=${HOME}/.cfg/${repo} --work-tree=${HOME} ls-files | sed "s;^;${HOME}/;"); do + NON_CONFIG=$(echo "${NON_CONFIG}" | grep -v "${managed}") + done +done + +echo "${NON_CONFIG}" | sed "s;^${HOME}/\?;;" | grep -v "^$" | sort