fix
This commit is contained in:
14
add_empty_folders.sh
Normal file
14
add_empty_folders.sh
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# 保存为 add_empty_folders.sh
|
||||||
|
|
||||||
|
echo "正在查找并处理空文件夹..."
|
||||||
|
|
||||||
|
# 查找所有空文件夹并创建 .gitkeep
|
||||||
|
find . -type d -empty | while read dir; do
|
||||||
|
if [ ! -f "$dir/.gitkeep" ]; then
|
||||||
|
touch "$dir/.gitkeep"
|
||||||
|
echo "✅ 已创建: $dir/.gitkeep"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "处理完成!"
|
||||||
0
rpmbuild/BUILD/.gitkeep
Normal file
0
rpmbuild/BUILD/.gitkeep
Normal file
0
rpmbuild/BUILDROOT/.gitkeep
Normal file
0
rpmbuild/BUILDROOT/.gitkeep
Normal file
Reference in New Issue
Block a user