Fix Bug: clearlogs generates logs inside exec
This commit is contained in:
parent
20dbd71665
commit
cb326a9d8d
10 changed files with 140 additions and 8 deletions
|
@ -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();
|
||||
}
|
|
@ -1,2 +0,0 @@
|
|||
UPDATE FAILED IN Mon Apr 19 21:51:16 2021
|
||||
|
|
@ -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
|
||||
}
|
Binary file not shown.
22
util/logfiles/disfailed.cpp
Normal file
22
util/logfiles/disfailed.cpp
Normal file
|
@ -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 <iostream>
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
|
||||
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;
|
||||
}
|
22
util/logfiles/enfailed.cpp
Normal file
22
util/logfiles/enfailed.cpp
Normal file
|
@ -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 <iostream>
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
|
||||
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;
|
||||
}
|
22
util/logfiles/ifailed.cpp
Normal file
22
util/logfiles/ifailed.cpp
Normal file
|
@ -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 <iostream>
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
|
||||
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;
|
||||
}
|
23
util/logfiles/sdfailed.cpp
Normal file
23
util/logfiles/sdfailed.cpp
Normal file
|
@ -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 <iostream>
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
|
||||
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;
|
||||
}
|
22
util/logfiles/ufailed.cpp
Normal file
22
util/logfiles/ufailed.cpp
Normal file
|
@ -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 <iostream>
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
|
||||
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;
|
||||
}
|
22
util/logfiles/uninfailed.cpp
Normal file
22
util/logfiles/uninfailed.cpp
Normal file
|
@ -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 <iostream>
|
||||
#include <fstream>
|
||||
#include <ctime>
|
||||
|
||||
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;
|
||||
}
|
Loading…
Reference in a new issue