1
This commit is contained in:
69
check_files.sh
Executable file
69
check_files.sh
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "========================================"
|
||||
echo "检查新增文件是否存在"
|
||||
echo "========================================"
|
||||
echo ""
|
||||
|
||||
files=(
|
||||
"Shared/Resource/kb_input_profiles.json"
|
||||
"Shared/KBInputProfileManager.h"
|
||||
"Shared/KBInputProfileManager.m"
|
||||
"CustomKeyboard/Manager/KBKeyboardLayoutResolver.h"
|
||||
"CustomKeyboard/Manager/KBKeyboardLayoutResolver.m"
|
||||
)
|
||||
|
||||
modified_files=(
|
||||
"CustomKeyboard/Resource/kb_keyboard_layout_config.json"
|
||||
"CustomKeyboard/View/KBKeyboardView.h"
|
||||
"CustomKeyboard/View/KBKeyboardView.m"
|
||||
"CustomKeyboard/View/KBKeyBoardMainView.h"
|
||||
"CustomKeyboard/View/KBKeyBoardMainView.m"
|
||||
"CustomKeyboard/KeyboardViewController.m"
|
||||
"CustomKeyboard/Manager/KBSuggestionEngine.h"
|
||||
"CustomKeyboard/Manager/KBSuggestionEngine.m"
|
||||
"keyBoard/Class/Me/VC/KBPersonInfoVC.m"
|
||||
)
|
||||
|
||||
base_path="/Users/mac/Desktop/项目/公司/KeyBoard"
|
||||
|
||||
echo "新增文件检查:"
|
||||
echo "----------------------------------------"
|
||||
all_new_exist=true
|
||||
for file in "${files[@]}"; do
|
||||
full_path="$base_path/$file"
|
||||
if [ -f "$full_path" ]; then
|
||||
echo "✅ $file"
|
||||
else
|
||||
echo "❌ $file (文件不存在)"
|
||||
all_new_exist=false
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "修改文件检查:"
|
||||
echo "----------------------------------------"
|
||||
all_modified_exist=true
|
||||
for file in "${modified_files[@]}"; do
|
||||
full_path="$base_path/$file"
|
||||
if [ -f "$full_path" ]; then
|
||||
echo "✅ $file"
|
||||
else
|
||||
echo "❌ $file (文件不存在)"
|
||||
all_modified_exist=false
|
||||
fi
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo "========================================"
|
||||
if [ "$all_new_exist" = true ] && [ "$all_modified_exist" = true ]; then
|
||||
echo "✅ 所有文件检查通过!"
|
||||
echo ""
|
||||
echo "下一步:"
|
||||
echo "1. 在 Xcode 中添加新增文件到工程"
|
||||
echo "2. 编译主 App 和扩展"
|
||||
echo "3. 运行测试"
|
||||
else
|
||||
echo "❌ 部分文件缺失,请检查!"
|
||||
fi
|
||||
echo "========================================"
|
||||
Reference in New Issue
Block a user