Skip to content
Snippets Groups Projects
Select Git revision
  • 5f906507d27f5ed3b906839333940ee0a210c388
  • master default
  • next_version
  • laurent-change.log
  • Documentation_homogeneisation
  • HEAD
  • 2021.02.02
  • 2021.02.01
  • 2021.02.00
  • 2021.01.00
  • 2020.02.02
  • 2020.02.01
  • 2020.02.00
  • 2020.01.05
  • 2020.01.04
  • 2020.01.03
  • 2020.01.02
  • 2020.01.01
  • 2020.01.00
  • 2019.03.00
  • 2019.02.07
  • 2019.02.06
  • 2019.02.05
  • 2019.02.04
  • 2019.02.03
  • 2019.02.02
26 results

get_deps.sh

Blame
  • get_deps.sh 1.30 KiB
    #!/bin/bash
    #
    #	Récupère l'ensemble des dépendances depuis conf/_install/dependency.xml
    #	Nécessite xmllint : sudo apt install libxml2-utils
    #
    #
    #
    #
    
    
    if [ "../conf/_install/dependency.xml" ]; then
    
    	let depsCount=$(xmllint --xpath 'count(//dependenciesCollection/dependency/name)' ../conf/_install/dependency.xml)
    	declare -A aDeps
    	vitisVersion=master
    
    	for (( i=1; i <= $depsCount; i++ )); do
    
    		sName="$(xmllint --xpath 'string(//dependenciesCollection/dependency['$i']/name)' ../conf/_install/dependency.xml)"
    		sVersion="$(xmllint --xpath 'string(//dependenciesCollection/dependency['$i']/version)' ../conf/_install/dependency.xml)"
    		sNature="$(xmllint --xpath 'string(//dependenciesCollection/dependency['$i']/nature)' ../conf/_install/dependency.xml)"
    
    		if [ $sName == "vitis" ]; then
    			vitisVersion=$sVersion
    		fi
    		if [ $sNature == "modules" ] || [ $sNature == "web_services" ] || [ $sName == "vitis" ]; then
    			aDeps[$i, name]=$sName
    			aDeps[$i, version]=$sVersion
    			aDeps[$i, nature]=$sNature
    		fi
    
    	done
    
    	echo "[INFO] dependencies:"
    	echo "vitis : $vitisVersion"
    	for (( i=1; i <= $depsCount; i++ )); do
    
    		echo "name: ${aDeps[$i, name]}"
    		echo "version: ${aDeps[$i, version]}"
    
    	done
    
    	export vitisVersion
    	export depsCount
    	export aDeps
    else
    	echo "[ERROR] ../conf/_install/dependency.xml not found"
    fi