/* Copyright (c) KylinSoft  Co., Ltd. [2023].All rights reserved.
    [ostree-maintain-daemon] licensed under the [Your LICENSE].
    Author: [ZhangTingting]
    Create: [2024]
*/

#include "mm-log.h"
#include <gio/gio.h>
#include <glib.h>

#include "mm-upgrade-create-ovldir.h"
#include "mm-upgrade-move-user-data.h"

int main(int argc, char **argv)
{
    gboolean ret;
    /*初始化日志打印*/
    mm_log_init();

    /*创建新部署ovl文件目录*/
    ret = mm_upgrade_create_ovldir();
    if (!ret) {
        g_print("create pengding dir failed.\n");
        return 0;
    }
    g_print("create pengding dir ok.\n");
    /*拷贝核心文件目录到新创建的目录*/
    ret = mm_upgrade_move_user_data();
    if (!ret) {
        g_print("copy ovl dir failed.\n");
        return 0;
    }
    g_print("copy ovl dir ok.\n");

    return 0;
}