summaryrefslogtreecommitdiffstats
path: root/deployment/scripts/install_yedit_for_ansible.sh
blob: ac4b0c44bde52adabf9a0018a384b78955f05200 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#! /bin/bash
#
# List of expected input args:
# - $1 is an env dir, i.e '/home/username/.../.tox/ocp3.6'
# - $2 is a tag or branch name to checkout from.

YEDIT_GIT_URL='git://github.com/vponomaryov/yedit.git'
TARGET_DIR=$1/src/yedit

if [[ ! -d $TARGET_DIR ]]; then
    mkdir -p $TARGET_DIR
    git clone $YEDIT_GIT_URL --single-branch --branch $2 $TARGET_DIR
else
    cd $TARGET_DIR
    git fetch -t --all
    git reset --hard $2
fi