From 609cf5c9e828e8a503d1316dd4d70f73ebb1fa25 Mon Sep 17 00:00:00 2001 From: Erickson Silva Date: Fri, 11 Mar 2016 11:45:42 -0300 Subject: [PATCH] Adiciona script para atualização de sinais utilizados pelo player para geração de vídeo. --- dict_update.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+), 0 deletions(-) create mode 100755 dict_update.sh diff --git a/dict_update.sh b/dict_update.sh new file mode 100755 index 0000000..e6f78cc --- /dev/null +++ b/dict_update.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +echo -e "\n\033[32m##### Iniciando a instalação VLibras-Core #####\033[0m\n" + +NOT_INSTALLED=false +DIR=/opt/vlibras_desktop/vlibras_player_Data/Bundles +BUNDLES=$HOME/unityVideo/videoCreator_Data + +function check_update_patches() +{ + count=0 + for d in "$DIR/*" ; do + count=$((count+1)) + apt-get install --only-upgrade --force-yes --yes patch${count}.0.0 > /dev/null 2>&1 + done +} + +if [ ! -d "$BUNDLES" ] ; then + mkdir $BUNDLES +fi + +if [ ! -f /etc/apt/sources.list.d/dicionario-vlibras.list ]; then + # Add repository to update the dictionary + echo 'deb http://150.165.204.46:8080 precise main' | sudo tee /etc/apt/sources.list.d/dicionario-vlibras.list > /dev/null 2>&1 +fi + +PKG_DICT=$(dpkg-query -W --showformat='${Status}\n' dicionario-vlibras:i386|grep "install ok installed") +if [ "" == "$PKG_DICT" ]; then + NOT_INSTALLED=true + sudo apt-get install --force-yes --yes dicionario-vlibras:i386 +else + sudo apt-get update + check_update_patches + sudo apt-get install --only-upgrade --force-yes --yes dicionario-vlibras:i386 +fi + +#copia dicionário para pasta de bundles +cp -r $DIR $BUNDLES + +#remove pacote +if [ "$NOT_INSTALLED" = true ] ; then + sudo apt-get autoremove -y dicionario-vlibras:i386 +fi \ No newline at end of file -- libgit2 0.21.2