#!/bin/bash cd wordpress git fetch --tags TAG="" while [ "$TAG" = "" ]; do read -p "Please enter tag, \"l\" to list tags or \"q\" to quit: " TAG if [ "$TAG" = "l" ]; then TAG="" git tag elif [ "$TAG" = "q" ]; then exit 0 fi done git checkout $TAG cd ..