upgrade_or_install() { git fetch --tags latestTag=$(git describe --tags `git rev-list --tags --max-count=1`) git checkout $latestTag echo '>> src/configure && make -C src' src/configure && make -C src if ! [ $? -eq 0 ]; then echo Previous command failed read 'Quit? [Y/n] ' if ! [ "$REPLY" -eq n ]; then exit 1 fi echo Wow, really? ok then fi }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter