Skip to content
Snippets Groups Projects
Commit 9f131870 authored by Armand Bahi's avatar Armand Bahi
Browse files

Utilisation des utils sans avoir besoin de libxml2

parent 1a61e637
No related branches found
No related tags found
No related merge requests found
...@@ -17,7 +17,6 @@ vMap is able to manage business objects while using WMS producing server softwar ...@@ -17,7 +17,6 @@ vMap is able to manage business objects while using WMS producing server softwar
To install the dev version of this project run the following steps: To install the dev version of this project run the following steps:
- Install the app via the VAI setup on var/www/[app name] - Install the app via the VAI setup on var/www/[app name]
- Run `sudo apt-get install libxml2-utils`
- Clone this repo on var/wwww/[app name]\_dev - Clone this repo on var/wwww/[app name]\_dev
- Run install.sh and give the var/www/[app name] path when asked to build your tree structure - Run install.sh and give the var/www/[app name] path when asked to build your tree structure
- Now you have the correct versioned tree structure, rename var/www/[app name] as var/www/[app name]\_vai and var/www/[app name]\_dev as var/www/[app name] - Now you have the correct versioned tree structure, rename var/www/[app name] as var/www/[app name]\_vai and var/www/[app name]\_dev as var/www/[app name]
......
#!/bin/bash #!/bin/bash
# #
# Récupère l'ensemble des dépendances depuis conf/_install/dependency.xml # 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 if [ "../conf/_install/dependency.xml" ]; then
let depsCount=$(xmllint --xpath 'count(//dependenciesCollection/dependency/name)' ../conf/_install/dependency.xml)
declare -A aDeps declare -A aDeps
vitisVersion=master vitisVersion=master
dependencies=($(cat "../conf/_install/dependency.xml" | tr -d '\040\011\012\015' | grep -oP '<dependency>([\s\S]*?)<\/dependency>'))
for (( i=1; i <= $depsCount; i++ )); do for i in ${!dependencies[*]}; do
sName="$(xmllint --xpath 'string(//dependenciesCollection/dependency['$i']/name)' ../conf/_install/dependency.xml)" sName=$(grep -oP '(?<=name>)[^<]+' <<< ${dependencies[$i]})
sVersion="$(xmllint --xpath 'string(//dependenciesCollection/dependency['$i']/version)' ../conf/_install/dependency.xml)" sVersion=$(grep -oP '(?<=version>)[^<]+' <<< ${dependencies[$i]})
sNature="$(xmllint --xpath 'string(//dependenciesCollection/dependency['$i']/nature)' ../conf/_install/dependency.xml)" sNature=$(grep -oP '(?<=nature>)[^<]+' <<< ${dependencies[$i]})
if [ $sName == "vitis" ]; then if [ $sName == "vitis" ]; then
vitisVersion=$sVersion vitisVersion=$sVersion
...@@ -33,16 +31,16 @@ if [ "../conf/_install/dependency.xml" ]; then ...@@ -33,16 +31,16 @@ if [ "../conf/_install/dependency.xml" ]; then
echo "[INFO] dependencies:" echo "[INFO] dependencies:"
echo "vitis : $vitisVersion" echo "vitis : $vitisVersion"
for (( i=1; i <= $depsCount; i++ )); do for i in ${!dependencies[*]}; do
echo "(${aDeps[$i, nature]}) ${aDeps[$i, name]} : ${aDeps[$i, version]}"
echo "name: ${aDeps[$i, name]}"
echo "version: ${aDeps[$i, version]}"
done done
depsCount=${#dependencies[@]}
export vitisVersion export vitisVersion
export depsCount export depsCount
export aDeps export aDeps
else else
echo "[ERROR] ../conf/_install/dependency.xml not found" echo "[ERROR] ../conf/_install/dependency.xml not found"
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment