and recreate any previous ../../compile/<blah> directory before laying down new files. The depends just aren't smart enough to save us from the grief that config's old behavior has always caused. Submitted by: jkh
This commit is contained in:
parent
5d7938a7cb
commit
b0ceb8dcf1
@ -90,7 +90,8 @@ usage: fputs("usage: config [-gp] sysname\n", stderr);
|
||||
perror(PREFIX);
|
||||
exit(2);
|
||||
}
|
||||
if (stat(p = path((char *)NULL), &buf)) {
|
||||
p = path((char *)NULL);
|
||||
if (stat(p, &buf)) {
|
||||
if (mkdir(p, 0777)) {
|
||||
perror(p);
|
||||
exit(2);
|
||||
@ -100,6 +101,23 @@ usage: fputs("usage: config [-gp] sysname\n", stderr);
|
||||
fprintf(stderr, "config: %s isn't a directory.\n", p);
|
||||
exit(2);
|
||||
}
|
||||
else {
|
||||
char tmp[strlen(p) + 8];
|
||||
|
||||
fprintf(stderr, "Removing old directory %s: ", p);
|
||||
fflush(stderr);
|
||||
sprintf(tmp, "rm -rf %s", p);
|
||||
if (system(tmp)) {
|
||||
fprintf(stderr, "Failed!\n");
|
||||
perror(tmp);
|
||||
exit(2);
|
||||
}
|
||||
fprintf(stderr, "Done.\n");
|
||||
if (mkdir(p, 0777)) {
|
||||
perror(p);
|
||||
exit(2);
|
||||
}
|
||||
}
|
||||
|
||||
loadaddress = -1;
|
||||
dtab = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user