From: Trent Huber Date: Thu, 4 Sep 2025 06:19:46 +0000 (-0400) Subject: Force copy when overwriting old installation X-Git-Url: https://trenthuber.com/code?a=commitdiff_plain;h=8192bd58bf03b61c807b7c7007d07568f2fd1100;p=thus.git Force copy when overwriting old installation --- diff --git a/tools/install.c b/tools/install.c index 7e653b2..e90ce07 100644 --- a/tools/install.c +++ b/tools/install.c @@ -30,7 +30,7 @@ int main(int argc, char **argv) { strcat(path, "thus"); if ((cpid = fork()) == -1) err(EXIT_FAILURE, "Unable to fork"); else if (cpid == 0) - run("/bin/cp", LIST("cp", "bin/thus", path), "copy", "bin/thus"); + run("/bin/cp", LIST("cp", "-f", "bin/thus", path), "copy", "bin/thus"); await(cpid, "copy", "bin/thus"); l = strlen(define);