Files
roro9stack/lib/term/src/scp_args.h
T
twislaandClaude Sonnet 5.5 18285c3212
CI / build (pull_request) Failing after 1m59s
Site / build (pull_request) Successful in 9s
Add uname, /uname and scp (key or masked password) in the Shell
- uname in the console and /uname in IRC: the firmware, its version and the chip
- scp: one file between the card and a trusted server, over SSH, with the
  device's key or a password asked (masked) in the Shell
- shared libssh helpers in src/platform/libssh_util
- README, user guide, command reference and a how-to updated

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0162FokPdvY2KsS4NBfwyWPk
2026-10-09 19:01:36 +02:00

24 lines
771 B
C++

#pragma once
#include <string>
#include "ssh_hosts.h"
namespace roro::term {
// What `scp` was asked: one file to the card from a server, or from the card to a server.
// scp [-f] [-P port] /notes/a.txt user@host:path (upload)
// scp [-f] [-P port] user@host:path /notes/a.txt (download; a destination ending in / gets the remote file's name)
// The card's paths start with a slash; the server's are the server's own (relative ones start at the home folder).
struct ScpArgs {
bool upload = false;
bool replace = false; // -f: a download may replace a file on the card
SshTarget target;
std::string local, remote;
};
// "" or what is wrong with it.
std::string parseScp(const std::string& args, ScpArgs& out);
} // namespace roro::term