Added cancelling
This commit is contained in:
parent
fdbb824ad3
commit
f76c0c7c28
@ -72,7 +72,7 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
|
|
||||||
if (!std::filesystem::exists("/etc/cowtool/disabled/install_"+name+".sh")) {
|
if (!std::filesystem::exists("/etc/cowtool/disabled/install_"+name+".sh")) {
|
||||||
std::cout << "First time installation! Watching you! Type 'manure' to complete the script!" << std::endl;
|
std::cout << "First time installation! Watching you! Type 'manure' to cancel, 'exit' to save!" << std::endl;
|
||||||
chdir("/sources/cowtool/buildspace/");
|
chdir("/sources/cowtool/buildspace/");
|
||||||
std::cout << "Entered buildspace - don't forget to clean up before exiting!" << std::endl;
|
std::cout << "Entered buildspace - don't forget to clean up before exiting!" << std::endl;
|
||||||
|
|
||||||
@ -96,9 +96,14 @@ int main(int argc, char* argv[]) {
|
|||||||
|
|
||||||
out.close();
|
out.close();
|
||||||
}
|
}
|
||||||
|
if (input=="manure") {
|
||||||
|
// Cancel!
|
||||||
|
system(("rm /etc/cowtool/disabled/install_"+name+".sh").c_str());
|
||||||
|
std::cout << "Cancelled `"+ name << "`!" << std::endl;
|
||||||
|
} else {
|
||||||
system((editor+" /etc/cowtool/disabled/install_"+name+".sh").c_str());
|
system((editor+" /etc/cowtool/disabled/install_"+name+".sh").c_str());
|
||||||
std::cout << "Remember to `milk` to update `"+ name << "`!" << std::endl;
|
std::cout << "Remember to `milk` to update `"+ name << "`!" << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
} else if (firstArg == "milk") {
|
} else if (firstArg == "milk") {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user