All pastes #289508 Raw Edit

mpd-status

public text v1 · immutable
#289508 ·published 2006-12-23 06:00 UTC
rendered paste body
!/bin/bash

MPC=""
MPD_STATUS_LINE=""
OUTPUT_TO_IRC=""

function get_mpc_path ()
{
    MPC=$(which mpc)
}

function get_set_output_string ()
{
    MPD_STATUS_LINE=$(exec $MPC status |line)
    OUTPUT_TO_IRC="voidengineer is listening to: $MPD_STATUS_LINE"
}

function main ()
{
    get_mpc_path
    get_set_output_string
    echo $OUTPUT_TO_IRC
}

main
 
exit 0