Exemple #1
0
# RUN SCRIPT
if __name__ == "__main__":
    artifact = None
    try:
        artifact = Artifact(bucket_name='ios-native-qustodio-dev')

        dependencies_hash = artifact.get_hash_from(
            file_content=DEPENDENCIES_FILE)
        artifact_name = f'{dependencies_hash}.zip'

        print('depenencies hash: ', dependencies_hash)
        print('ROOT_PATH: ', ROOT_PATH)

        if not os.path.isdir(INSTALL_DIR):
            if artifact.try_download_and_unzip_artifact(
                    artifact_name,
                    LIBIMOBILEDEVICE_NODE_ARTIFACT,
                    unzip_path=get_relative_path('../')):
                exit(0)

            print("🛠 Don't worry building it for you...")
    except Exception as error:
        print(f"💥 Artifact error: {error}")
        print("🛠 Don't worry building libimobiledevice for you...")

    if not os.path.isdir(TMP_PATH):
        os.mkdir(TMP_PATH)

    # Install Openssl
    install_openssl_ifneeded()

    # Install libimobledevice tools and library