This commit is contained in:
Oleg Sheynin 2024-07-25 12:42:43 -04:00
parent fa6dd0fa95
commit b353572ea6
2 changed files with 35 additions and 10 deletions

View File

@ -1 +1 @@
1.0.9
1.1.1

View File

@ -7,10 +7,6 @@ git_repo_arr[cvttpy]=git@cloud21.cvtt.vpn:/opt/store/git/cvttpy.git
git_repo_arr[ops]=git@cloud21.cvtt.vpn:/opt/store/git/ops.git
git_repo_arr[research]=git@cloud21.cvtt.vpn:/opt/store/git/research.git
default_project=cvttpy
default_branch=master
dist_root=/home/cvttdist/software/cvtt2
dist_user=cvttdist
dist_host="cloud21.cvtt.vpn"
@ -21,11 +17,40 @@ dist_locations="cloud21.cvtt.vpn:22 homestore.cvtt.vpn:22"
interactive=Y
# cmdline
prj=${1:-${default_project}}
brnch=${2:-${default_branch}}
if [ "${3}" == "D" ]; then
prj=
brnch=master
interactive=N
fi
usage() {
echo "Usage: $0 -p <project> [-b <branch (master)> -i (interactive)"
exit 1
}
while getopts ":p:b:i" opt; do
case ${opt} in
p )
prj=$OPTARG
;;
b )
brnch=$OPTARG
;;
i )
interactive=Y
;;
\? )
echo "Invalid option: -$OPTARG" >&2
usage
;;
: )
echo "Option -$OPTARG requires an argument." >&2
usage
;;
esac
done
function confirm {
if [ "${interactive}" == "Y" ]; then