#!/bin/sh mpc update mpc save current if mpc | grep "playing"; then mpc crop; else mpc clear; fi && mpc listall | mpc add mpc save allfiles if mpc | grep "playing"; then mpc crop; else mpc clear; fi && mpc load current