improved compatibility with bash!

This commit is contained in:
J-K-Tech 2024-02-17 19:33:50 -03:00 committed by GitHub
commit 05a34bb1b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -5,10 +5,26 @@
std::string get(std::string); std::string get(std::string);
std::map<std::string,std::string> variables; std::map<std::string,std::string> 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( int call(
std::string lines){ std::string lines){
std::string com; std::string com;
com.append("call"); com.append(CALL);
printf("command:%s\n\nexecuting\n\n\n",lines.c_str()); printf("command:%s\n\nexecuting\n\n\n",lines.c_str());
com.append(lines.c_str()); com.append(lines.c_str());