43 lines
779 B
TypeScript
43 lines
779 B
TypeScript
namespace _mimir.transfer.local
|
|
{
|
|
|
|
/**
|
|
*/
|
|
export function execute(
|
|
parameters : _mimir.conf.type_target_parameters_local,
|
|
name : string,
|
|
stamp : string,
|
|
directory : string
|
|
) : Array<string>
|
|
{
|
|
const result : Array<string> = [];
|
|
const target_directory : string = lib_plankton.string.coin(
|
|
"{{base}}/{{stamp}}/{{name}}",
|
|
{
|
|
"base": parameters.directory,
|
|
"stamp": stamp,
|
|
"name": name,
|
|
}
|
|
);
|
|
result.push(
|
|
lib_plankton.string.coin(
|
|
"mkdir --parents {{directory}}",
|
|
{
|
|
"directory": target_directory,
|
|
}
|
|
)
|
|
);
|
|
result.push(
|
|
lib_plankton.string.coin(
|
|
"mv {{directory_from}}/* {{directory_to}}/",
|
|
{
|
|
"directory_from": directory,
|
|
"directory_to": target_directory,
|
|
}
|
|
)
|
|
);
|
|
return result;
|
|
}
|
|
|
|
}
|
|
|