Commit 609cf5c9e828e8a503d1316dd4d70f73ebb1fa25
1 parent
e4ee94bb
Exists in
master
and in
1 other branch
Adiciona script para atualização de sinais utilizados pelo player para geração de vídeo.
Showing
1 changed file
with
43 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,43 @@ | @@ -0,0 +1,43 @@ | ||
1 | +#!/bin/bash | ||
2 | + | ||
3 | +echo -e "\n\033[32m##### Iniciando a instalação VLibras-Core #####\033[0m\n" | ||
4 | + | ||
5 | +NOT_INSTALLED=false | ||
6 | +DIR=/opt/vlibras_desktop/vlibras_player_Data/Bundles | ||
7 | +BUNDLES=$HOME/unityVideo/videoCreator_Data | ||
8 | + | ||
9 | +function check_update_patches() | ||
10 | +{ | ||
11 | + count=0 | ||
12 | + for d in "$DIR/*" ; do | ||
13 | + count=$((count+1)) | ||
14 | + apt-get install --only-upgrade --force-yes --yes patch${count}.0.0 > /dev/null 2>&1 | ||
15 | + done | ||
16 | +} | ||
17 | + | ||
18 | +if [ ! -d "$BUNDLES" ] ; then | ||
19 | + mkdir $BUNDLES | ||
20 | +fi | ||
21 | + | ||
22 | +if [ ! -f /etc/apt/sources.list.d/dicionario-vlibras.list ]; then | ||
23 | + # 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 | ||
25 | +fi | ||
26 | + | ||
27 | +PKG_DICT=$(dpkg-query -W --showformat='${Status}\n' dicionario-vlibras:i386|grep "install ok installed") | ||
28 | +if [ "" == "$PKG_DICT" ]; then | ||
29 | + NOT_INSTALLED=true | ||
30 | + sudo apt-get install --force-yes --yes dicionario-vlibras:i386 | ||
31 | +else | ||
32 | + sudo apt-get update | ||
33 | + check_update_patches | ||
34 | + sudo apt-get install --only-upgrade --force-yes --yes dicionario-vlibras:i386 | ||
35 | +fi | ||
36 | + | ||
37 | +#copia dicionário para pasta de bundles | ||
38 | +cp -r $DIR $BUNDLES | ||
39 | + | ||
40 | +#remove pacote | ||
41 | +if [ "$NOT_INSTALLED" = true ] ; then | ||
42 | + sudo apt-get autoremove -y dicionario-vlibras:i386 | ||
43 | +fi | ||
0 | \ No newline at end of file | 44 | \ No newline at end of file |