src/cli/lib/shell.h \
src/cli/lib/search.c \
src/cli/lib/search.h \
+ src/cli/lib/snapshot.c \
+ src/cli/lib/snapshot.h \
+ src/cli/lib/snapshot_update.c \
+ src/cli/lib/snapshot_update.h \
src/cli/lib/sync.c \
src/cli/lib/sync.h \
src/cli/lib/terminal.c \
--- /dev/null
+/*#############################################################################
+# #
+# Pakfire - The IPFire package management system #
+# Copyright (C) 2024 Pakfire development team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#include "command.h"
+#include "snapshot.h"
+#include "snapshot_update.h"
+
+int cli_snapshot(void* data, int argc, char* argv[]) {
+ static const struct command commands[] = {
+ { "update", cli_snapshot_update, 0, 0, 0 },
+ { NULL },
+ };
+
+ return cli_parse(NULL, commands, NULL, NULL, NULL, 0, argc, argv, data);
+}
--- /dev/null
+/*#############################################################################
+# #
+# Pakfire - The IPFire package management system #
+# Copyright (C) 2024 Pakfire development team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#ifndef PAKFIRE_CLI_SNAPSHOT_H
+#define PAKFIRE_CLI_SNAPSHOT_H
+
+int cli_snapshot(void* data, int argc, char* argv[]);
+
+#endif /* PAKFIRE_CLI_SNAPSHOT_H */
#include "lib/requires.h"
#include "lib/shell.h"
#include "lib/search.h"
+#include "lib/snapshot.h"
#include "lib/terminal.h"
#include "lib/version.h"
{ "requires", cli_requires, 1, -1, 0 },
{ "shell", cli_shell, 0, -1, 0 },
{ "search", cli_search, 1, -1, 0 },
+ { "snapshot", cli_snapshot, 1, -1, 0 },
{ NULL },
};
"repolist\n"
"requires PATTERN\n"
"shell [OPTIONS...] [COMMAND...]\n"
- "search [OPTIONS...] PATTERN";
+ "search [OPTIONS...] PATTERN\n"
+ "snapshot [COMMAND...]";
static error_t parse(int key, char* arg, struct argp_state* state, void* data) {
struct cli_config* config = data;