From d8ff79117797ac1c5f5dd34cdf5cb3b23413bccb Mon Sep 17 00:00:00 2001 From: salt Date: Fri, 23 Feb 2024 17:09:10 -0800 Subject: [PATCH] add gitkeeps to preserve empty folders --- .../comfy_mtb/extern/GFPGAN/.gitkeep | 0 .../extern/frame_interpolation/.gitkeep | 0 workflows/comfy/add_gitkeeps.sh | 21 +++++++++++++++++++ workflows/comfy/gitkeeps.txt | 2 ++ 4 files changed, 23 insertions(+) create mode 100644 workflows/comfy/ComfyUI/custom_nodes/comfy_mtb/extern/GFPGAN/.gitkeep create mode 100644 workflows/comfy/ComfyUI/custom_nodes/comfy_mtb/extern/frame_interpolation/.gitkeep create mode 100755 workflows/comfy/add_gitkeeps.sh create mode 100644 workflows/comfy/gitkeeps.txt diff --git a/workflows/comfy/ComfyUI/custom_nodes/comfy_mtb/extern/GFPGAN/.gitkeep b/workflows/comfy/ComfyUI/custom_nodes/comfy_mtb/extern/GFPGAN/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/workflows/comfy/ComfyUI/custom_nodes/comfy_mtb/extern/frame_interpolation/.gitkeep b/workflows/comfy/ComfyUI/custom_nodes/comfy_mtb/extern/frame_interpolation/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/workflows/comfy/add_gitkeeps.sh b/workflows/comfy/add_gitkeeps.sh new file mode 100755 index 0000000..8397141 --- /dev/null +++ b/workflows/comfy/add_gitkeeps.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +cd ComfyUI + +# Check if the input file exists +if [ ! -f ../gitkeeps.txt ]; then + echo "File 'gitkeeps.txt' not found!" + exit 1 +fi + +# Read each line from the file +while IFS= read -r directory; do + # Check if the line is not empty and the directory exists + if [[ -n "$directory" && -d "$directory" ]]; then + # Add a .gitkeep file to the directory + touch "${directory}/.gitkeep" + echo "Added .gitkeep to $directory" + else + echo "Directory '$directory' not found or line is empty." + fi +done < ../gitkeeps.txt diff --git a/workflows/comfy/gitkeeps.txt b/workflows/comfy/gitkeeps.txt new file mode 100644 index 0000000..d6357cf --- /dev/null +++ b/workflows/comfy/gitkeeps.txt @@ -0,0 +1,2 @@ +custom_nodes/comfy_mtb/extern/GFPGAN/ +custom_nodes/comfy_mtb/extern/frame_interpolation/