print command
This commit is contained in:
+1
-1
@@ -14,8 +14,8 @@ mv cppipe ${PREFIX}/bin
|
|||||||
|
|
||||||
# Install headers
|
# Install headers
|
||||||
mkdir -p ${PREFIX}/include/cppipe
|
mkdir -p ${PREFIX}/include/cppipe
|
||||||
cp basicTypes.h commands.hpp commands.inl childProcess.hpp childProcess.inl ${PREFIX}/include/cppipe
|
|
||||||
chmod 755 ${PREFIX}/include/cppipe
|
chmod 755 ${PREFIX}/include/cppipe
|
||||||
|
cp basicTypes.h commands.hpp commands.inl childProcess.hpp childProcess.inl ${PREFIX}/include/cppipe
|
||||||
chmod 644 ${PREFIX}/include/cppipe/*
|
chmod 644 ${PREFIX}/include/cppipe/*
|
||||||
|
|
||||||
# Clear old cache
|
# Clear old cache
|
||||||
|
|||||||
@@ -161,4 +161,7 @@ PendingCmd operator&(const PendingCmd&, const Cmd&);
|
|||||||
*/
|
*/
|
||||||
std::string $(const PendingCmd&);
|
std::string $(const PendingCmd&);
|
||||||
|
|
||||||
|
/* Operator<< for printing */
|
||||||
|
std::ostream& operator<<(std::ostream&, const Cmd&);
|
||||||
|
|
||||||
#include "commands.inl"
|
#include "commands.inl"
|
||||||
|
|||||||
@@ -283,3 +283,10 @@ inline PendingCmd operator&(const PendingCmd& cleft, const Cmd& right)
|
|||||||
const_cast<PendingCmd&>(cleft).detach();
|
const_cast<PendingCmd&>(cleft).detach();
|
||||||
return PendingCmd(right);
|
return PendingCmd(right);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline std::ostream& operator<<(std::ostream& s, const Cmd& c)
|
||||||
|
{
|
||||||
|
for(size_t i = 0; i < c.argv.size() - 1; ++i)
|
||||||
|
s << '"' << c.argv[i] << '"' << ' ';
|
||||||
|
return s << std::endl;
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ cppipe compile options from tft
|
|||||||
respect CXXFLAGS LDFLAGS
|
respect CXXFLAGS LDFLAGS
|
||||||
|
|
||||||
?
|
?
|
||||||
|
run(cmd)
|
||||||
|
string args
|
||||||
args before src file go to compiler
|
args before src file go to compiler
|
||||||
use exceptions (open_or_die)
|
use exceptions (open_or_die)
|
||||||
precompiled header cppipe.h
|
precompiled header cppipe.h
|
||||||
|
|||||||
Reference in New Issue
Block a user