From 05a34bb1b2c47b6c2af2de9f8acbb3fc04ff34f6 Mon Sep 17 00:00:00 2001 From: J-K-Tech <82116913+J-K-Tech@users.noreply.github.com> Date: Sat, 17 Feb 2024 19:33:50 -0300 Subject: [PATCH] improved compatibility with bash! --- main.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 9c9415e..910aaba 100644 --- a/main.cpp +++ b/main.cpp @@ -5,10 +5,26 @@ std::string get(std::string); std::map variables; +#define CALL "" +#ifdef _WIN32 +#undef CALL +#define CALL "call" +#endif + +#ifdef linux +#undef CALL +#define CALL "exec" +#endif + +#ifdef __APPLE__ +#undef CALL +#define CALL "exec" +#endif + int call( std::string lines){ std::string com; - com.append("call"); + com.append(CALL); printf("command:%s\n\nexecuting\n\n\n",lines.c_str()); com.append(lines.c_str());