diff options
author | Erich Eckner <git@eckner.net> | 2021-11-13 11:48:04 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-11-13 11:48:04 +0100 |
commit | 2388290351a69bf71c5647329fcef95739d5a934 (patch) | |
tree | a5df563d636e4bd587570fd6236ae4bd750e2613 /common | |
parent | a6b4d01228cc8dd76b672b4a1d9e7c5a499a9735 (diff) | |
download | carddav-alpine-converter-2388290351a69bf71c5647329fcef95739d5a934.tar.xz |
find_vcs() new
Diffstat (limited to 'common')
-rw-r--r-- | common | 19 |
1 files changed, 19 insertions, 0 deletions
@@ -17,6 +17,25 @@ gen_rev() { )" } +find_vcs() { + { + find "${git_dir}" \ + -name '.git' \ + -prune \ + , \ + -type f \ + -name '*.vcs' \ + -printf '%p\n' + git -C "${git_dir}" archive HEAD \ + | tar -t \ + | sed ' + /\.vcs$/!d + s@^@'"${git_dir%/}"'/@ + ' + } \ + | sort -u +} + git_dir="$1" if [ ! -d "${git_dir}" ]; then |