Skip to content

Instantly share code, notes, and snippets.

@Zren
Created February 6, 2018 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Zren/ea0e5fd1b24a299bb00c776c859ca017 to your computer and use it in GitHub Desktop.
Save Zren/ea0e5fd1b24a299bb00c776c859ca017 to your computer and use it in GitHub Desktop.
#!/bin/bash
function echoCommand () {
echo -e "$(tput setab 12) $(tput sgr0)$(tput setaf 12)\uE0B0$(tput sgr0)$(tput setaf 9) $@$(tput sgr0) "
$@
}
echoCommand kdesrc-build --build-only --resume-from=$1 $1
result="$?"
if [ $result != 0 ]; then
paplay /usr/share/sounds/Oxygen-Sys-App-Negative.ogg
echoCommand cat ~/kde/src/log/latest/$1/error.log
exit $result
fi
paplay /usr/share/sounds/Oxygen-Sys-App-Positive.ogg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment