summaryrefslogtreecommitdiffstats
path: root/src/apk.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-03-04 08:36:56 +0200
committerTimo Teras <timo.teras@iki.fi>2009-03-04 08:36:56 +0200
commita62dcf37c1d1ee2907e5e39759aa99259c458783 (patch)
tree501369316957cf772e291fb4e00918ebd09825b4 /src/apk.c
parent457943f83e21bde7e6858884d25bc89934344a52 (diff)
downloadapk-tools-a62dcf37c1d1ee2907e5e39759aa99259c458783.tar.bz2
apk-tools-a62dcf37c1d1ee2907e5e39759aa99259c458783.tar.xz
apk: --force to overwrite files
Diffstat (limited to 'src/apk.c')
-rw-r--r--src/apk.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/apk.c b/src/apk.c
index 79a873a..8ad4200 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -24,7 +24,7 @@
const char *apk_root;
struct apk_repository_url apk_repository_list;
int apk_verbosity = 1, apk_progress = 0, apk_upgrade = 0;
-int apk_clean = 0;
+int apk_clean = 0, apk_force = 0;
int apk_cwd_fd;
void apk_log(const char *prefix, const char *format, ...)
@@ -111,7 +111,7 @@ static struct apk_repository_url *apk_repository_new(const char *url)
return r;
}
-#define NUM_GENERIC_OPTS 7
+#define NUM_GENERIC_OPTS 8
static struct option generic_options[32] = {
{ "root", required_argument, NULL, 'p' },
{ "repository", required_argument, NULL, 'X' },
@@ -120,6 +120,7 @@ static struct option generic_options[32] = {
{ "version", no_argument, NULL, 'V' },
{ "progress", no_argument, &apk_progress, 1 },
{ "clean-protected", no_argument, &apk_clean, 1 },
+ { "force", no_argument, &apk_force, 1 },
};
int main(int argc, char **argv)