Ticket #18379: select.sh.diff

File select.sh.diff, 704 bytes (added by lperry (Perry Lee), 16 years ago)
  • select.sh

     
    7373# list all (currently) available versions
    7474list_version() {
    7575    echo "Available versions:"
    76     echo $(ls -1 ${CONFPATH} | grep -v base)
     76    echo $(ls -1 ${CONFPATH} | grep -Ev '(base|current)')
    7777}
    7878
    7979# list the currently selected version
     
    8787
    8888# test if a particular version is available
    8989version_is_valid() {
    90     for version in $(ls -1 ${CONFPATH} | grep -v base); do
     90    for version in $(ls -1 ${CONFPATH} | grep -Ev '(base|current)'); do
    9191        if [ "${1}" == "${version}" ]; then
    9292            return 0
    9393        fi