From cdc44e8c7c7495235bd82160fd33efe33f85c7b0 Mon Sep 17 00:00:00 2001 From: dmarakom6 Date: Tue, 15 Jun 2021 13:51:22 +0300 Subject: [PATCH] Make names less confusing Logfiles to see: logs/ Loggers executables: util/exec/ Loggers source code: util/loggersrc/ Maybe I will merge exec with loggersrc in the near future, in case it's very complicated for users. --- util/loggersrc/.clearlogs.cpp | 29 +++++++++++++++++++++ util/{logfiles => loggersrc}/disfailed.cpp | 0 util/{logfiles => loggersrc}/enfailed.cpp | 0 util/{logfiles => loggersrc}/ifailed.cpp | 0 util/{logfiles => loggersrc}/sdfailed.cpp | 0 util/{logfiles => loggersrc}/ufailed.cpp | 0 util/{logfiles => loggersrc}/uninfailed.cpp | 0 util/quickread.sh | 4 +-- 8 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 util/loggersrc/.clearlogs.cpp rename util/{logfiles => loggersrc}/disfailed.cpp (100%) rename util/{logfiles => loggersrc}/enfailed.cpp (100%) rename util/{logfiles => loggersrc}/ifailed.cpp (100%) rename util/{logfiles => loggersrc}/sdfailed.cpp (100%) rename util/{logfiles => loggersrc}/ufailed.cpp (100%) rename util/{logfiles => loggersrc}/uninfailed.cpp (100%) diff --git a/util/loggersrc/.clearlogs.cpp b/util/loggersrc/.clearlogs.cpp new file mode 100644 index 0000000..33acbde --- /dev/null +++ b/util/loggersrc/.clearlogs.cpp @@ -0,0 +1,29 @@ +/* +shellnotes - clearlogs.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 + +using namespace std; + +int main () +{ + std::ofstream ofs; + ofs.open("../../logs/sdfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.close(); + ofs.open("../../logs/ufailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.close(); + ofs.open("../../logs/ifailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.close(); + ofs.open("../../logs/enfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.close(); + ofs.open("../../logs/disfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.close(); + ofs.open("../../logs/uninfailed.txt", std::ofstream::out | std::ofstream::trunc); + ofs.close(); +} \ No newline at end of file diff --git a/util/logfiles/disfailed.cpp b/util/loggersrc/disfailed.cpp similarity index 100% rename from util/logfiles/disfailed.cpp rename to util/loggersrc/disfailed.cpp diff --git a/util/logfiles/enfailed.cpp b/util/loggersrc/enfailed.cpp similarity index 100% rename from util/logfiles/enfailed.cpp rename to util/loggersrc/enfailed.cpp diff --git a/util/logfiles/ifailed.cpp b/util/loggersrc/ifailed.cpp similarity index 100% rename from util/logfiles/ifailed.cpp rename to util/loggersrc/ifailed.cpp diff --git a/util/logfiles/sdfailed.cpp b/util/loggersrc/sdfailed.cpp similarity index 100% rename from util/logfiles/sdfailed.cpp rename to util/loggersrc/sdfailed.cpp diff --git a/util/logfiles/ufailed.cpp b/util/loggersrc/ufailed.cpp similarity index 100% rename from util/logfiles/ufailed.cpp rename to util/loggersrc/ufailed.cpp diff --git a/util/logfiles/uninfailed.cpp b/util/loggersrc/uninfailed.cpp similarity index 100% rename from util/logfiles/uninfailed.cpp rename to util/loggersrc/uninfailed.cpp diff --git a/util/quickread.sh b/util/quickread.sh index 23158cf..97e048d 100644 --- a/util/quickread.sh +++ b/util/quickread.sh @@ -18,8 +18,8 @@ function quickread() { else clear - echo "No such note." - cd ~ + echo "No such note." fi + cd $DIR } \ No newline at end of file