]> ruin.nu Git - popboot.git/blobdiff - action.cpp
seems to be working now
[popboot.git] / action.cpp
index 87947ca054bb6684bfe9e23e006a16ff94df7c6c..6e4b60785917cf7627c7ef1969b9621481c40022 100644 (file)
@@ -1,4 +1,5 @@
 #include "action.h"
+#include <cstdlib>
 #include <iostream>
 using namespace std;
 using namespace __gnu_cxx;
@@ -16,6 +17,7 @@ Action::Action(const Action& action){
        _name = action._name;
        _preconditions = action._preconditions;
        _effects = action._effects;
+       _executable = action._executable;
 }
 
 const Literals& Action::effects(int value) const{
@@ -30,8 +32,8 @@ const Preconditions& Action::preconditions() const{
 }
 
 int Action::execute() const{
-       cout << "Executing: " << _executable << endl;
-       return 0;
+       cout << "Executing: " << _name << endl;
+       return system(_executable.c_str());
 }
 
 const string& Action::name() const{