mirror of
https://github.com/usatiuk/backup.git
synced 2025-10-27 01:37:49 +01:00
omg it's very hacky but mounting kinda works
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
add_library(commands srcs/Command.cpp srcs/CommandDiff.cpp srcs/CommandList.cpp srcs/CommandListFiles.cpp srcs/CommandRestore.cpp srcs/CommandRun.cpp srcs/CommandsCommon.cpp srcs/Diff.cpp)
|
||||
add_library(commands srcs/Command.cpp srcs/CommandDiff.cpp srcs/CommandList.cpp srcs/CommandListFiles.cpp srcs/CommandRestore.cpp srcs/CommandRun.cpp srcs/CommandsCommon.cpp srcs/Diff.cpp srcs/CommandMount.cpp)
|
||||
|
||||
target_include_directories(commands PUBLIC includes)
|
||||
|
||||
target_link_libraries(commands crypto repo chunkers utils change_detectors)
|
||||
target_link_libraries(commands crypto repo chunkers utils change_detectors fuse)
|
||||
|
||||
17
src/commands/includes/CommandMount.h
Normal file
17
src/commands/includes/CommandMount.h
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// Created by Stepan Usatiuk on 07.06.2023.
|
||||
//
|
||||
|
||||
#ifndef BACKUP_COMMANDMOUNT_H
|
||||
#define BACKUP_COMMANDMOUNT_H
|
||||
|
||||
#include "Command.h"
|
||||
|
||||
class CommandMount : public Command {
|
||||
public:
|
||||
CommandMount();
|
||||
void run(Context ctx) override;
|
||||
};
|
||||
|
||||
|
||||
#endif//BACKUP_COMMANDMOUNT_H
|
||||
14
src/commands/srcs/CommandMount.cpp
Normal file
14
src/commands/srcs/CommandMount.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
//
|
||||
// Created by Stepan Usatiuk on 07.06.2023.
|
||||
//
|
||||
|
||||
#include "../includes/CommandMount.h"
|
||||
#include "RepoFS.h"
|
||||
|
||||
CommandMount::CommandMount() : Command("mount") {
|
||||
}
|
||||
|
||||
void CommandMount::run(Context ctx) {
|
||||
RepoFS rfs(ctx.repo, ctx.repo->getObjects(Object::ObjectType::Archive).begin()->second, "./hi");
|
||||
rfs.workerFn();
|
||||
}
|
||||
Reference in New Issue
Block a user