#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# Copyright (C) 2012-2019 British Crown (Met Office) & Contributors.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Rose is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Rose. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# NAME
#     rosie id
#
# SYNOPSIS
#     rosie id [OPTIONS]
#
#     # Print the repository URL of a given suite ID
#     rosie id --to-origin mo1-abc45
#
#     # Print the local location of a given suite ID
#     rosie id --to-local-copy mo1-abc45
#
#     # Print the output directory of a given suite ID
#     rosie id --to-output mo1-abc45
#
#     # Print the web URL of a given suite ID
#     rosie id --to-web mo1-abc45
#
#     # Print suite ID of working copy in $PWD
#     rosie id
#
#     # Print suite ID of working copy in a directory
#     rosie id /path/to/working/copy
#
#     # Print suite ID of a given URL
#     rosie id svn://fcm1/rose_mo1_svn/a/b/c/4/5
#
#     # Print latest suite ID in the default repository
#     rosie id --latest
#
#     # Print latest suite ID in the given repository
#     rosie id --latest mot
#
#     # Print next suite ID in the default repository
#     rosie id --next
#
# DESCRIPTION
#     Utility for working with suite IDs.
#
# OPTIONS
#     --latest
#         Print the latest suite ID in the repository
#     --to-local-copy
#         Print the local location of a given suite ID
#     --to-origin
#         Print the repository URL of a given suite ID
#     --to-output
#         Print the output directory of a given suite ID
#     --to-web
#         Print the web URL of a given suite ID
#     --next
#         Print the next available suite ID in the repository
#-------------------------------------------------------------------------------
exec python2 -m rosie.suite_id "$@"
