kopia lustrzana https://github.com/piku/piku
Don't mangle stdout with header. (#67)
This fix allows you to usefully pipe things from the output of 'piku run' into other scripts. For example you might pipe a request log into goaccess for analysis.pull/68/head
rodzic
b920c85c08
commit
3778088da7
18
piku
18
piku
|
@ -8,21 +8,23 @@
|
|||
|
||||
remote=`git config --get remote.piku.url`
|
||||
|
||||
echo "Piku remote operator."
|
||||
out() { printf "%s\n" "$*" >&2; }
|
||||
|
||||
out "Piku remote operator."
|
||||
|
||||
if [ "$remote" = "" ]
|
||||
then
|
||||
echo
|
||||
echo "Error: no piku server configured."
|
||||
echo "Use PIKU_SERVER=piku@MYSERVER.NET or configure a git remote called 'piku'."
|
||||
echo
|
||||
out
|
||||
out "Error: no piku server configured."
|
||||
out "Use PIKU_SERVER=piku@MYSERVER.NET or configure a git remote called 'piku'."
|
||||
out
|
||||
else
|
||||
server=${PIKU_SERVER:-`echo $remote | cut -f1 -d":" 2>/dev/null`}
|
||||
app=${PIKU_APP:-`echo $remote | cut -f2 -d":" 2>/dev/null`}
|
||||
cmd="$1"
|
||||
echo "Server: $server"
|
||||
echo "App: $app"
|
||||
echo
|
||||
out "Server: $server"
|
||||
out "App: $app"
|
||||
out
|
||||
case "$cmd" in
|
||||
apps|setup|setup:ssh|"")
|
||||
ssh -A "$server" "$@"
|
||||
|
|
Ładowanie…
Reference in New Issue