This commit is contained in:
parent
dbcef96bc2
commit
5d42db7331
18
build.sh
18
build.sh
@ -101,17 +101,13 @@ if [ $AUTO_INSTALL = true ]; then
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
read -p "Do you want to install the program? (y/n) " -n 1 -r
|
||||
echo
|
||||
if [[ $REPLY =~ ^[Yy]$ ]]; then
|
||||
print_status "Installing dropshell..."
|
||||
sudo make install
|
||||
if [ $? -eq 0 ]; then
|
||||
print_status "Installation successful!"
|
||||
else
|
||||
print_error "Installation failed!"
|
||||
exit 1
|
||||
fi
|
||||
print_status "Installing dropshell..."
|
||||
sudo make install
|
||||
if [ $? -eq 0 ]; then
|
||||
print_status "Installation successful!"
|
||||
else
|
||||
print_error "Installation failed!"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -772,8 +772,8 @@ std::string service_runner::get_latest_backup_file(const std::string& server, co
|
||||
bool service_runner::rsync_copy(const std::string& local_path, const std::string& remote_path, bool silent) {
|
||||
std::cout << "Copying: [LOCAL] " << local_path << std::endl << std::string(8,' ')<<"[REMOTE] " << remote_path << std::endl;
|
||||
|
||||
runner::runner_local rsync_runner("rsync", {"--delete","--mkpath","-zrpc","-e",quote("ssh -p " + mServerEnv.get_SSH_PORT()),local_path,
|
||||
mServerEnv.get_SSH_USER()+"@"+mServerEnv.get_SSH_HOST()+":"+remote_path}, "", {}, true);
|
||||
runner::runner_local rsync_runner("rsync", {"--delete","--mkpath","-zrpc","-e",quote("ssh -p " + mServerEnv.get_SSH_PORT()),quote(local_path),
|
||||
quote(mServerEnv.get_SSH_USER()+"@"+mServerEnv.get_SSH_HOST()+":"+remote_path)});
|
||||
|
||||
if (!rsync_runner.execute()) {
|
||||
std::cerr << "Failed to copy files using rsync" << std::endl;
|
||||
|
@ -112,6 +112,12 @@ bool runner_local::execute() {
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
||||
std::cout << "Executing command: " << mCommand << std::endl;
|
||||
std::cout << "Args: ";
|
||||
for (auto& arg : mArgs) std::cout << "[" << arg << "] ";
|
||||
std::cout << std::endl;
|
||||
|
||||
execvp(mCommand.c_str(), argv.data());
|
||||
perror("execvp");
|
||||
exit(127);
|
||||
|
Loading…
x
Reference in New Issue
Block a user