guru_sdk/guru_app/tools/bin/ad_review_ios_checker

28 lines
932 B
Python
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#!/usr/bin/env python3
import os
# 获取当前目录路径
current_directory = os.getcwd()
# iOS文件夹路径
ios_directory = os.path.join(current_directory, 'ios')
# 查找以AppLovinQualityService开头并以.rb结尾的文件
applovinFile = None
for filename in os.listdir(ios_directory):
if filename.startswith('AppLovinQualityService') and filename.endswith('.rb'):
applovinFile = os.path.join(ios_directory, filename)
break
# 判断是否找到符合条件的文件
if applovinFile:
# 判断是否存在AppLovinQualityService文件夹
applovin_folder = os.path.join(ios_directory, 'AppLovinQualityService')
if not os.path.exists(applovin_folder):
# 在ios目录下执行命令
os.system(f'ruby {applovinFile}')
else:
print('iOS目录中已存在AppLovinQualityService文件夹不执行任何操作。')
else:
print('未找到符合条件的文件。')