if [ ! -d /archives/config ]; then
  dialog --title "Directory /archives/config not found" --msgbox " 
You can't load any  \
configurations." 9 60 
  exit
fi
cat << EOF > /tmp/choiscript
dialog --title "DISPLAY an INFORMATION" --menu "
You may choose a configuration. 
You can do that with the cursor.
" 20 68 9 \\
EOF

VAR1=`ls /archives/config/ | wc -l | tail -c2`

if [ $VAR1 = '0' ]; then
exit
fi

for VAR in /archives/config/* ; do
  VAR2=`basename $VAR `
  echo "\"$VAR2\" \"\" \\" >> /tmp/choiscript
done
echo "2> /tmp/choixligne" >> /tmp/choiscript

  . /tmp/choiscript
  if [ ! $? = 0 ]; then rm -f /tmp/choixligne /tmp/choiscript; exit 1; fi
  NOM="`cat /tmp/choixligne`"
  
ls /archives/config/$NOM/info >/dev/null 2>/dev/null

if [ $? = 1 ]; then
  dialog --title "FICHIER not found" --msgbox " 
        You can't Load any informations \n
               for this configuration." 9 60 
  exit
fi

dialog --title "DISPLAY the CONFIGURATIONS" --textbox /archives/config/$NOM/info 20 70
rm -f /tmp/choixligne
