diff --git a/lodel/plugins/Makefile.am b/lodel/plugins/Makefile.am index e5c6d4d..87fb00b 100644 --- a/lodel/plugins/Makefile.am +++ b/lodel/plugins/Makefile.am @@ -5,8 +5,7 @@ lodel2confdir=$(sysconfdir)/lodel2 install-data-hook: mkdir -p ${DESTDIR}$(pluginsdir); cp -R * ${DESTDIR}$(pluginsdir) && rm ${DESTDIR}$(pluginsdir)/Makefile* ;\ - cd ${DESTDIR}; \ - mkdir -p $(lodel2confdir); \ + mkdir -p ${DESTDIR}$(lodel2confdir); \ if [ ! -d ${DESTDIR}$(lodel2confdir)/plugins ]; \ then \ ln -rs -t ${DESTDIR}$(lodel2confdir) $(pluginsdir); \ diff --git a/progs/create_datas.sh b/progs/create_data.sh similarity index 100% rename from progs/create_datas.sh rename to progs/create_data.sh diff --git a/progs/create_datas_simpleem.sh b/progs/create_data_simpleem.sh similarity index 97% rename from progs/create_datas_simpleem.sh rename to progs/create_data_simpleem.sh index 3b50445..d14f1df 100755 --- a/progs/create_datas_simpleem.sh +++ b/progs/create_data_simpleem.sh @@ -2,8 +2,8 @@ usage() { echo -e "Usage : $0 host_of_server instance_name host_of_db number_of_iterations >&2" - echo -e "Example : create_datas locahost instance_00001 localhost:28015 1000" - echo -e "Example : create_datas locahost instance_00001 localhost 1000" + echo -e "Example : create_data_simpleem locahost instance_00001 localhost:28015 1000" + echo -e "Example : create_data_simpleem locahost instance_00001 localhost 1000" exit 1 } @@ -18,7 +18,7 @@ instance=$2 N=$4 HOSTDB=$3 dbname=lodel2_$instance -dbuser=admin +dbuser=admin dbpwd=pass curl_options='--silent -o /dev/null -s -w %{url_effective};%{http_code};%{time_connect};%{time_starttransfer};%{time_total}\n' @@ -30,12 +30,12 @@ do FN=$(lenmax=20;wcount=1; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") LC='' curl -o /dev/null -s -d "field_input_lastname=$LN&field_input_firstname=$FN&field_input_linked_containers=$LC&classname=Person" http://$host/$instance/admin/create?classname=Person - + # Classe User PWD='pwgen 10' LOGIN="${FN,,}$(printf "%d" $RANDOM)" curl -o /dev/null -s -d "field_input_lastname=$LN&field_input_firstname=$FN&field_input_password=$PWD&field_input_login=$LOGIN&classname=User" http://$host/$instance/admin/create?classname=User - + # Classe Entry, champs à remplir : name, description, role, linked_texts ENLT='' #$(printf "use $dbname\nDBQuery.shellBatchSize = 30000\n db.Article.find({}, {lodel_id:1, _id:0})" | mongo $HOSTDB/admin -u $dbuser -p $dbpwd | sed "1,3d" | sed -e "s/{ \"lodel_id\" : //g" | sed -e "s/ }//g" | shuf | head -n 3; ) ENROLE=$(shuf -e 'geography' 'subject' 'keywords' | head -n 1) @@ -62,11 +62,11 @@ do fi done COLLD=$tmp - COLT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") - COLST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") + COLT=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") + COLST=$(lenmax=100;wcount=20; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") LG=$(shuf -e 'fr' 'en' 'es' 'ger' 'it'| head -n 1) - DESC=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") - PBN=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") + DESC=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") + PBN=$(lenmax=500;wcount=100; rlenmax=$(expr $lenmax - 1); echo $(shuf /usr/share/dict/words | head -n $wcount | tr -s "\n" " ") | sed -E "s/^(.{$rlenmax}).*$/\1/") ISSN=$(