From 117f3c058968670b186ff46b2c9dad12dd7f3c23 Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Tue, 24 Sep 2024 18:26:07 -0300 Subject: [PATCH] Exclude '.git' --- README.md | 2 +- libexec/webskel/scripts/install | 4 +++- libexec/webskel/scripts/mkdir | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a26c689..2db17b7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ webskel is a command-line utility that provides skeletons (or "templates") to help you quickly start your next web application or service. The concept is inspired by skeleton directories from the UNIX world - where they can serve as the starting point for a new user's `${HOME}` directory. For the time being - -there is only skeleton to choose from: +there is only one skeleton to choose from: [@webskel/dolphins7.skeleton](https://github.com/webskel/dolphins7.skeleton#readme). ## Examples diff --git a/libexec/webskel/scripts/install b/libexec/webskel/scripts/install index 912359e..7cb4f3b 100755 --- a/libexec/webskel/scripts/install +++ b/libexec/webskel/scripts/install @@ -11,6 +11,8 @@ destdir="${2}" cd "${target}" find . \ -type f \ - -exec install -m u=rwx,g=rx,o= {} "${destdir}"/"{}" \; \ + ! -name ".git" \ + ! -path "../.git/*" \ + -exec install -m u=rwx,g=rx,o= "{}" "${destdir}"/"{}" \; \ -exec echo -n . \; echo diff --git a/libexec/webskel/scripts/mkdir b/libexec/webskel/scripts/mkdir index 626cd77..f4d522c 100755 --- a/libexec/webskel/scripts/mkdir +++ b/libexec/webskel/scripts/mkdir @@ -10,6 +10,7 @@ destdir="${2}" # main cd "${target}" find . \ + ! -name .git \ -type d \ -exec install -d -m u=rwx,g=rx,o= "${destdir}"/"{}" \; \ -exec echo -n . \;