#!/bin/bash
#------------------------------------------------------------------------------
set -u
# Modify to adjust the list of exempt users. LOCK_EXEMPT_USERS is a
# space-delimited list of users exempt from the lock.
export LOCK_EXEMPT_USERS="hera quinn"
function msg () { echo -e "$*"; }
function bail () { msg "\nError: ${1:-Unknown Error}\n"; exit 1; }
declare ThisScript=${0##*/}
declare User=${1:-Unset}
[[ $User == Unset ]] && bail "$ThisScript: Bad usage. Usage: $ThisScript <user>"
for ExemptUser in $LOCK_EXEMPT_USERS; do
[[ $User == $ExemptUser ]] && exit 0
done
msg "
Your submit has been rejected because you are submitting to a path locked due to a pending release.
We expect branch to be unlocked again after 3:00 PM PT on Sunday, October 8, 2017.
We apologize for any inconvenience.
"
exit 1