improved compatibility with bash!
This commit is contained in:
parent
f80379c2ec
commit
05a34bb1b2
1 changed files with 17 additions and 1 deletions
18
main.cpp
18
main.cpp
|
|
@ -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());
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue