limarka 19.5.pre.281 → 19.5.pre.283

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/instalador.sh +75 -18
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 681522167aea8bb68c38706e65992bb027098f4da804b390f3d8ec92f109b8cd
4
- data.tar.gz: 604ebc0ea37d2c48334ed41cc13f6372b11a7d5a62065da7a857ee497313c515
3
+ metadata.gz: 11ec76cd8958cd1a3068f40758d2889c696ebe8a88d45ff8c12d61b101d528bb
4
+ data.tar.gz: 890322820205969daa1904315240ef98453f6edae4fa8925883ea8f23af842e5
5
5
  SHA512:
6
- metadata.gz: 697e3364d276385695a3cbedbc44e9a050bc053e87b2e09de01d6027a06370ce752d6822d98af756742fc52bc10576ed745e0bf8863a82a5f17b14aa428ce0b4
7
- data.tar.gz: 71a14f35841fab22cd192a96adfb93afe3b16ed4c393be11881c92ffdbc8428c39973916e30163aa332dd485ae825bb7dd13197a0efae968e94fd43687d76d39
6
+ metadata.gz: 6f579cf99dec0230079cd9f8636ff7e284a5f93cb47809809a60d1cb98bc42c74b588b583d6db86b3e7ef7d6b66316d8064733ec364f254ee32bfbe36d7b8cad
7
+ data.tar.gz: c7213f180f1a6d07876142e93d778dc6eabf2c3e96d205cac91d534a8837c35b1515f3357af7d42b3c97dc028f47074614d534721ba8724e0222eac54a228b57
data/bin/instalador.sh CHANGED
@@ -1,4 +1,7 @@
1
1
  #!/usr/bin/env sh
2
+ # rodar script usando:
3
+ # ". instalador.sh" ou "bash -i instalador.sh"
4
+ # ver https://askubuntu.com/a/1102119
2
5
 
3
6
  #quiet
4
7
  #dependencias=dev,user
@@ -12,6 +15,7 @@ quiet=0
12
15
  dependencias=dev
13
16
  pandoc=0
14
17
  tex=tiny
18
+ distro=$(lsb_release -i -s)
15
19
  codename=$(lsb_release -c -s)
16
20
  grupo=basico
17
21
  pacotes=
@@ -62,26 +66,58 @@ while getopts "DPCd:t:c:g:p:" opt; do
62
66
  done
63
67
 
64
68
  # ler distribuição: lsb_release -c -s
65
- if [ "$codename" = "xenial" ]; then
66
-
69
+ if [ "$distro" = "Ubuntu" -o "$distro" = "ManjaroLinux" ]; then
67
70
  if [ "$dependencias" = "dev" ]; then
68
71
  echo Instalando dependências de desenvolvimento...
69
- $dry sudo apt-get install -y -qq \
72
+ if [ "$distro" = "Ubuntu" ]; then
73
+ $dry sudo apt-get install -y -qq \
70
74
  language-pack-pt \
71
75
  libreoffice \
72
76
  locales \
73
77
  pdfgrep \
74
- pdftk \
75
78
  poppler-utils \
76
79
  ruby-full \
77
80
  unzip \
78
81
  xclip
82
+ if [ "$codename" = "xenial" ]; then
83
+ $dry sudo apt-get install pdftk -y
84
+ elif [ "$codename" = "bionic" ]; then
85
+ $dry sudo add-apt-repository ppa:malteworld/ppa -y
86
+ $dry sudo apt-get update
87
+ $dry sudo apt-get install pdftk -y
88
+ else
89
+ # Ubuntu >= 18.10
90
+ $dry sudo apt-get install pdftk-java -y
91
+ fi
92
+ elif [ "$distro" = "ManjaroLinux" ]; then
93
+ $dry sudo pacman -S --noconfirm \
94
+ ruby \
95
+ poppler \
96
+ xclip \
97
+ pacaur
98
+ $dry yes J | pacaur -S pdftk-bin
99
+ fi
79
100
  elif [ "$dependencias" = "user" ]; then
80
101
  $dry echo Opção ainda não implementada: user
81
102
  fi
82
103
 
83
104
  if [ "$tex" = "none" ]; then
84
105
  echo Ignorando instalação do Latex
106
+ elif [ "$tex" = "system" ]; then
107
+ if [ "$distro" = "ManjaroLinux" ]; then
108
+ $dry sudo pacman -S texlive-core \
109
+ texlive-bin \
110
+ texlive-latexextra
111
+ $dry yes J | pacaur -S abntex2
112
+ elif [ "$distro" = "Ubuntu" ]; then
113
+ $dry sudo apt-get install -y \
114
+ texlive \
115
+ texlive-publishers \
116
+ texlive-lang-portuguese \
117
+ texlive-latex-extra \
118
+ texlive-fonts-recommended \
119
+ texlive-xetex
120
+ fi
85
121
  elif [ "$tex" = "tiny" ]; then
86
122
 
87
123
  tex_em_cache=0
@@ -92,12 +128,17 @@ if [ "$codename" = "xenial" ]; then
92
128
  fi
93
129
  fi
94
130
 
95
- if [ $tex_em_cache -eq 1 ]; then
96
- : #echo TinyTeX não será instalado.
131
+ if [ $tex_em_cache -eq 1 ];
132
+ then
133
+ echo TinyTeX não será instalado.
97
134
  else
98
135
  echo Instalando o tinytex...
99
136
  $dry wget -qO- "https://yihui.name/gh/tinytex/tools/install-unx.sh" | $dry sh
100
-
137
+ # Deve ser colocado no Path, se não tlmgr dá comando não encontrado
138
+ $dry echo -e "\n\n# TinyTeX BIN" >> ~/.bashrc
139
+ $dry echo -e "export "PATH"=$"PATH":~/.TinyTeX/bin/x86_64-linux" >> ~/.bashrc
140
+ $dry source ~/.bashrc
141
+
101
142
  if [ "$grupo" = "basico" ]; then
102
143
  $dry tlmgr install abntex2 \
103
144
  babel-portuges \
@@ -114,22 +155,38 @@ if [ "$codename" = "xenial" ]; then
114
155
  elif [ "$grupo" = "extras" ]; then
115
156
  $dry Opção ainda não implementada: extras
116
157
  fi
117
-
158
+
118
159
  if [ -n "$pacotes" ] ; then
119
160
  $dry tlmgr install $pacotes
120
161
  fi
121
-
162
+
122
163
  $dry tlmgr option -- autobackup 0
123
- fi
124
-
125
-
126
- fi #tex
127
-
128
- fi # xenial
164
+
165
+ fi #tex
166
+ fi
167
+ fi # UbuntuLinux | ManjaroLinux
129
168
 
130
169
  if [ "$pandoc" -eq 1 ]
131
170
  then
132
- #echo Instalando o pandoc...
133
- $dry wget -nv https://github.com/jgm/pandoc/releases/download/2.7.3/pandoc-2.7.3-1-amd64.deb \
134
- && $dry sudo dpkg -i pandoc-*.deb
171
+ echo Ignorando instalação dos Binários do Pandoc
172
+ if [ "$distro" = "ManjaroLinux" ]; then
173
+ $dry yes J | pacaur -S pandoc-bin
174
+ else
175
+ #echo Instalando o pandoc...
176
+ $dry wget -nv https://github.com/jgm/pandoc/releases/download/2.7.3/pandoc-2.7.3-1-amd64.deb \
177
+ && $dry sudo dpkg -i pandoc-*.deb
178
+ fi
179
+ fi
180
+
181
+ if ! $dry gem install limarka
182
+ then
183
+ $dry "Não foi possível instalar o limarka"
184
+ $dry exit 1
135
185
  fi
186
+
187
+ # Especifico pro Manjaro
188
+ if [ "$distro" = "ManjaroLinux" ]; then
189
+ $dry echo -e "\n\n# RUBY GEMS BIN" >> ~/.bashrc
190
+ $dry echo -e "export "PATH"=$"PATH":~/.gem/ruby/2.6.0/bin" >> ~/.bashrc
191
+ $dry source ~/.bashrc
192
+ fi
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: limarka
3
3
  version: !ruby/object:Gem::Version
4
- version: 19.5.pre.281
4
+ version: 19.5.pre.283
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eduardo de Santana Medeiros Alexandre