Commit e9b85bfd0082f38c478fbbe2f1545bd72a612790
1 parent
f4a2ac55
Exists in
master
and in
1 other branch
Atualiza dict_update.sh para remover arquivos .description ao copiar para a pasta Bundles
Showing
1 changed file
with
11 additions
and
7 deletions
Show diff stats
dict_update.sh
| 1 | #!/bin/bash | 1 | #!/bin/bash |
| 2 | 2 | ||
| 3 | -echo -e "\n\033[32m##### Iniciando a instalação VLibras-Core ##### #####\033[0m\n"33[0m\n" | 3 | +echo -e "\n\033[32m##### Atualizando dicionário ##### #####\033[0m\n"33[0m\n" |
| 4 | 4 | ||
| 5 | NOT_INSTALLED=false | 5 | NOT_INSTALLED=false |
| 6 | DIR=/opt/vlibras_desktop/vlibras_player_Data/Bundles | 6 | DIR=/opt/vlibras_desktop/vlibras_player_Data/Bundles |
| 7 | -BUNDLES=$HOME/unityVideo/videoCreator_Data | 7 | +PLAYER_DATA="$HOME/unityVideo/videoCreator_Data" |
| 8 | +BUNDLES="$PLAYER_DATA/Bundles" | ||
| 8 | 9 | ||
| 9 | function check_update_patches() | 10 | function check_update_patches() |
| 10 | { | 11 | { |
| @@ -15,10 +16,6 @@ function check_update_patches() | @@ -15,10 +16,6 @@ function check_update_patches() | ||
| 15 | done | 16 | done |
| 16 | } | 17 | } |
| 17 | 18 | ||
| 18 | -if [ ! -d "$BUNDLES" ] ; then | ||
| 19 | - mkdir $BUNDLES | ||
| 20 | -fi | ||
| 21 | - | ||
| 22 | if [ ! -f /etc/apt/sources.list.d/dicionario-vlibras.list ]; then | 19 | if [ ! -f /etc/apt/sources.list.d/dicionario-vlibras.list ]; then |
| 23 | # Add repository to update the dictionary | 20 | # Add repository to update the dictionary |
| 24 | echo 'deb http://150.165.204.46:8080 precise main' | sudo tee /etc/apt/sources.list.d/dicionario-vlibras.list > /dev/null 2>&1 | 21 | echo 'deb http://150.165.204.46:8080 precise main' | sudo tee /etc/apt/sources.list.d/dicionario-vlibras.list > /dev/null 2>&1 |
| @@ -34,8 +31,15 @@ else | @@ -34,8 +31,15 @@ else | ||
| 34 | sudo apt-get install --only-upgrade --force-yes --yes dicionario-vlibras:i386 | 31 | sudo apt-get install --only-upgrade --force-yes --yes dicionario-vlibras:i386 |
| 35 | fi | 32 | fi |
| 36 | 33 | ||
| 34 | +#remove pasta bundles | ||
| 35 | +if [ -d "$BUNDLES" ] ; then | ||
| 36 | + rm -r $BUNDLES | ||
| 37 | +fi | ||
| 38 | + | ||
| 37 | #copia dicionário para pasta de bundles | 39 | #copia dicionário para pasta de bundles |
| 38 | -cp -r $DIR $BUNDLES | 40 | +cp -r $DIR $PLAYER_DATA |
| 41 | +cd $BUNDLES | ||
| 42 | +rm *.description | ||
| 39 | 43 | ||
| 40 | #remove pacote | 44 | #remove pacote |
| 41 | if [ "$NOT_INSTALLED" = true ] ; then | 45 | if [ "$NOT_INSTALLED" = true ] ; then |