1 2 3 4 5 6 7 8
#!/bin/sh CMD='git clean -dfX */' if git pull | grep -v 'Already up-to-date.' then echo "Executing $CMD" $CMD fi