Commit e5f87fda authored by Baptiste CHOCOT's avatar Baptiste CHOCOT
Browse files

bugfix for --sha

parent 552fe82c
......@@ -64,7 +64,11 @@ def entry_point(url, system_type, location=None, user=None, password=None, token
else:
install_cli = "False"
if not name:
name = ""
name = "None"
# SHA
if not sha:
sha = "None"
# go into the right directory to execute the script
path = os.path.dirname(__file__)
......
......@@ -36,17 +36,16 @@ fi
git clone --recursive $url
if [ $? -eq 0 ];then
repo_name=`echo $url | rev | cut -d '.' -f2 | rev`
repo_name=`echo $repo_name | rev | cut -d '/' -f1 | rev`
# If sha or tag is specified
if [ $sha != "None" ];then
dest=`echo $end | sed 's,^.*/,,' | sed 's,\.git$,,'`
cd $dest
git checkout $sha
cd $repo_name
git checkout $sha || exit 1
cd ..
fi
# If the system has to be installed
if [ $cli == "True" ];then
repo_name=`echo $url | rev | cut -d '.' -f2 | rev`
repo_name=`echo $repo_name | rev | cut -d '/' -f1 | rev`
cd $repo_name
diva_evaluation_cli/bin/install.sh
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment