]> Trent Huber's Code - thus.git/commitdiff
Force copy when overwriting old installation
authorTrent Huber <trentmhuber@gmail.com>
Thu, 4 Sep 2025 06:19:46 +0000 (02:19 -0400)
committerTrent Huber <trentmhuber@gmail.com>
Thu, 4 Sep 2025 06:19:46 +0000 (02:19 -0400)
tools/install.c

index 7e653b2211388a4e0d3a214278f7884f4dc96a99..e90ce07fc4015abc321c02a9d4c9337a6ffad3ef 100644 (file)
@@ -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);