diff options
Diffstat (limited to 'bruiser')
-rw-r--r-- | bruiser/bruiser.cpp | 5 | ||||
-rw-r--r-- | bruiser/lua-scripts/misc.lua | 35 | ||||
-rw-r--r-- | bruiser/makefile | 3 |
3 files changed, 41 insertions, 2 deletions
diff --git a/bruiser/bruiser.cpp b/bruiser/bruiser.cpp index 56ea865..04c194d 100644 --- a/bruiser/bruiser.cpp +++ b/bruiser/bruiser.cpp @@ -87,7 +87,7 @@ namespace { // start of anonymous namespace std::vector<std::string> PushToLua; bruiser::M0_ERR m0_err [[maybe_unused]]; - bruiser::BruiserReport BruiseRep; + //bruiser::BruiserReport BruiseRep; struct ShellGlobal { ShellGlobal() = default; @@ -822,7 +822,7 @@ public: /*@DEVI-obviously the best way to do this is to use the main signature already used, instead of going with a general predefined one. the current form is a temp.*/ Rewrite.InsertTextAfter(SLE.getLocWithOffset(1U), StringRef("\n\nint main(int argc, const char **argv)\n{\n\treturn sub_main(argc, argv);\n}\n")); - BruiseRep.PrintToLog("hijacked main main."); + //BruiseRep.PrintToLog("hijacked main main."); } } @@ -2315,6 +2315,7 @@ int main(int argc, const char **argv) { if (strcmp(argv[i], "--keepalive") == 0) {KEEPALIVE = true; continue;} if (strcmp(argv[i], "--lua") == 0) {NonCLILuaScript = argv[i+1]; argc_n--; continue;} if (strcmp(argv[i], "--luadefault") == 0) {LuaDefault = argv[i+1]; argc_n--; continue;} + if (strcmp(argv[i], "--history") == 0) {SHELL_HISTORY_FILE = argv[i+1]; argc_n--; continue;} argv_n.push_back(argv[i]); argc_n++; } diff --git a/bruiser/lua-scripts/misc.lua b/bruiser/lua-scripts/misc.lua new file mode 100644 index 0000000..711f795 --- /dev/null +++ b/bruiser/lua-scripts/misc.lua @@ -0,0 +1,35 @@ + +------------------------------------------------Project Mutator----------------------------------------------- +--bruiser's lua functions that fall under misc or util +--Copyright (C) 2018 Farzad Sadeghi + +--This program is free software; you can redistribute it and/or +--modify it under the terms of the GNU General Public License +--as published by the Free Software Foundation; either version 3 +--of the License, or (at your option) any later version. + +--This program is distributed in the hope that it will be useful, +--but WITHOUT ANY WARRANTY; without even the implied warranty of +--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +--GNU General Public License for more details. + +--You should have received a copy of the GNU General Public License +--along with this program; if not, write to the Free Software +--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.*/ +-------------------------------------------------------------------------------------------------------------- +--start of xobj module +local misc = {} + +function misc.pgrep(name) + local handle = io.popen("pgrep "..name) + local ret = {} + for line in handle:lines() do + table.insert(ret, tonumber(line)) + end + return ret +end + +--end of xobj module +return misc +-------------------------------------------------------------------------------------------------------------- + diff --git a/bruiser/makefile b/bruiser/makefile index b0cac30..cde4611 100644 --- a/bruiser/makefile +++ b/bruiser/makefile @@ -74,6 +74,9 @@ clean: rm .dependc $(MAKE) -C luatablegen clean +install: + mkdir $$(HOME)/.bruiser + deepclean: rm -f *.o *~ $(BRUISER) rm .depend |