diff --git a/logs/.clearlogs.cpp b/logs/.clearlogs.cpp index db9a941..33acbde 100644 --- a/logs/.clearlogs.cpp +++ b/logs/.clearlogs.cpp @@ -14,16 +14,16 @@ using namespace std; int main () { std::ofstream ofs; - ofs.open("sdfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.open("../../logs/sdfailed.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); - ofs.open("ufailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.open("../../logs/ufailed.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); - ofs.open("ifailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.open("../../logs/ifailed.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); - ofs.open("enfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.open("../../logs/enfailed.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); - ofs.open("disfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.open("../../logs/disfailed.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); - ofs.open("uninfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.open("../../logs/uninfailed.txt", std::ofstream::out | std::ofstream::trunc); ofs.close(); } \ No newline at end of file diff --git a/logs/ufailed.txt b/logs/ufailed.txt index 7f3531f..e69de29 100644 --- a/logs/ufailed.txt +++ b/logs/ufailed.txt @@ -1,2 +0,0 @@ -UPDATE FAILED IN Mon Apr 19 21:51:16 2021 - diff --git a/util/.hidden/.resetshellnotes.sh b/util/.hidden/.resetshellnotes.sh index 259dc32..7d0c94c 100644 --- a/util/.hidden/.resetshellnotes.sh +++ b/util/.hidden/.resetshellnotes.sh @@ -17,5 +17,6 @@ function resetshellnotes() { echo "/bin/nano"> ~/.shellnotes/util/sd/sd-input2.txt echo "~/Notes" > ~/.shellnotes/util/sd/sd-input3.txt esac + cd $DIR return 0 } \ No newline at end of file diff --git a/util/exec/clearlogs b/util/exec/clearlogs index b9f9dec..e7e5400 100644 Binary files a/util/exec/clearlogs and b/util/exec/clearlogs differ diff --git a/util/logfiles/disfailed.cpp b/util/logfiles/disfailed.cpp new file mode 100644 index 0000000..7651830 --- /dev/null +++ b/util/logfiles/disfailed.cpp @@ -0,0 +1,22 @@ +/* +shellnotes - disfailed.cpp +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +*/ + +#include +#include +#include + +using namespace std; + +int main() +{ + time_t now = time(0); + char* dt = ctime(&now); + std::ofstream outfile ("../../logs/disfailed.txt", std::ios_base::app); + outfile << "DISABLING FAILED IN " << dt << "\n"; + outfile.close(); + return 0; +} \ No newline at end of file diff --git a/util/logfiles/enfailed.cpp b/util/logfiles/enfailed.cpp new file mode 100644 index 0000000..738c8de --- /dev/null +++ b/util/logfiles/enfailed.cpp @@ -0,0 +1,22 @@ +/* +shellnotes - enfailed.cpp +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +*/ + +#include +#include +#include + +using namespace std; + +int main() +{ + time_t now = time(0); + char* dt = ctime(&now); + std::ofstream outfile ("../../logs/enfailed.txt", std::ios_base::app); + outfile << "ENABLING FAILED IN " << dt << "\n"; + outfile.close(); + return 0; +} \ No newline at end of file diff --git a/util/logfiles/ifailed.cpp b/util/logfiles/ifailed.cpp new file mode 100644 index 0000000..2f8e7d4 --- /dev/null +++ b/util/logfiles/ifailed.cpp @@ -0,0 +1,22 @@ +/* +shellnotes - ifailed.cpp +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +*/ + +#include +#include +#include + +using namespace std; + +int main() +{ + time_t now = time(0); + char* dt = ctime(&now); + std::ofstream outfile ("../../logs/ifailed.txt", std::ios_base::app); + outfile << "INSTALLATION FAILED IN " << dt << "\n"; + outfile.close(); + return 0; +} \ No newline at end of file diff --git a/util/logfiles/sdfailed.cpp b/util/logfiles/sdfailed.cpp new file mode 100644 index 0000000..2a07da3 --- /dev/null +++ b/util/logfiles/sdfailed.cpp @@ -0,0 +1,23 @@ +/* +shellnotes - sdfailed.cpp +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +*/ + +#include +#include +#include + +using namespace std; + +int main() +{ + time_t now = time(0); + char* dt = ctime(&now); + ofstream sdfailed; + std::ofstream outfile ("../../logs/sdfailed.txt", std::ios_base::app); + outfile << "INVALID PATH FOR DEFAULT EDITOR/FOLDER IN " << dt << "\n"; + outfile.close(); + return 0; +} \ No newline at end of file diff --git a/util/logfiles/ufailed.cpp b/util/logfiles/ufailed.cpp new file mode 100644 index 0000000..4f181dc --- /dev/null +++ b/util/logfiles/ufailed.cpp @@ -0,0 +1,22 @@ +/* +shellnotes - ufailed.cpp +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +*/ + +#include +#include +#include + +using namespace std; + +int main() +{ + time_t now = time(0); + char* dt = ctime(&now); + std::ofstream outfile ("../../logs/ufailed.txt", std::ios_base::app); + outfile << "UPDATE FAILED IN " << dt << "\n"; + outfile.close(); + return 0; +} \ No newline at end of file diff --git a/util/logfiles/uninfailed.cpp b/util/logfiles/uninfailed.cpp new file mode 100644 index 0000000..557148b --- /dev/null +++ b/util/logfiles/uninfailed.cpp @@ -0,0 +1,22 @@ +/* +shellnotes - uninfailed.cpp +(C) Dimitris Marakomihelakis +Released under the "All rights reserved" category. See the RIGHTS.txt file +in /docs/github/ for its full text. +*/ + +#include +#include +#include + +using namespace std; + +int main() +{ + time_t now = time(0); + char* dt = ctime(&now); + std::ofstream outfile ("../../logs/uninfailed.txt", std::ios_base::app); + outfile << "UNINSTALLATION FAILED IN " << dt << "\n"; + outfile.close(); + return 0; +} \ No newline at end of file