Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
LaTeX-UTC
Templates
Lettre-LaTeX-UTC
Commits
c165f73b
Commit
c165f73b
authored
Apr 13, 2018
by
Florent Chehab
Browse files
update script
parent
248976bd
Pipeline
#21621
passed with stage
in 27 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
c165f73b
...
@@ -6,8 +6,8 @@ building-latex-master:
...
@@ -6,8 +6,8 @@ building-latex-master:
-
apt-get update --yes
-
apt-get update --yes
-
apt-get install imagemagick --yes
-
apt-get install imagemagick --yes
-
apt-get install wget --yes
-
apt-get install wget --yes
-
bash get_assets
.sh
-
bash
build.sh
get_assets
-
bash
make_
build.sh
-
bash build.sh
make
artifacts
:
artifacts
:
paths
:
paths
:
-
lettre-UTC-ex.pdf
-
lettre-UTC-ex.pdf
...
@@ -28,8 +28,8 @@ building-latex-other-branch:
...
@@ -28,8 +28,8 @@ building-latex-other-branch:
-
apt-get update --yes
-
apt-get update --yes
-
apt-get install imagemagick --yes
-
apt-get install imagemagick --yes
-
apt-get install wget --yes
-
apt-get install wget --yes
-
bash get_assets
.sh
-
bash
build.sh
get_assets
-
bash
make_
build.sh
-
bash build.sh
make
artifacts
:
artifacts
:
paths
:
paths
:
-
lettre-UTC-ex.pdf
-
lettre-UTC-ex.pdf
...
...
build.sh
0 → 100755
View file @
c165f73b
#!/bin/bash
case
"
$1
"
in
get_assets
)
echo
"récupérération des assets"
# Création du dossier des assets externes s'il le faut
rm
-rf
__EXTERNAL_ASSETS__
mkdir
__EXTERNAL_ASSETS__
cd
./__EXTERNAL_ASSETS__
# Récupération des assets
a
=
"https://gitlab.utc.fr/LaTeX-UTC/Graphismes-UTC/raw/master/logos/UTC/logo_UTC.pdf "
b
=
"https://gitlab.utc.fr/LaTeX-UTC/Graphismes-UTC/raw/master/elements/fleche/fleche.pdf "
c
=
"https://gitlab.utc.fr/LaTeX-UTC/Graphismes-UTC/raw/master/couleurs/couleurs_UTC.sty "
for
url
in
$a$b$c
do
wget
$url
if
[[
$?
-ne
0
]]
;
then
echo
"Erreure lors de la récupération des assets !"
echo
"Problème de connexion ou les assets ont été déplassés !"
exit
1
;
fi
done
cd
../
echo
"Tous les assets extérieurs nécesssaires sont opérationnels."
;;
make
)
echo
"Génération de l'archive"
rm
-rf
build
;
mkdir
build
;
cp
lettre-UTC.cls ./build
cp
lettre-UTC-ex.tex ./build
cp
LICENSE ./build
cp
README.md ./build
cp
-r
__EXTERNAL_ASSETS__ ./build
cp
.gitignore ./build
cp
.latexmkrc ./build
# copy for building
cp
-rf
./build ./build_tmp
# try to build
cd
./build_tmp
latexmk
-pdf
lettre-UTC-ex.tex
# if successfull
cd
../
cp
build_tmp/lettre-UTC-ex.pdf ./
rm
-rf
./build_tmp
zip
-r
latex-lettre-UTC.zip ./build
# generate preview
convert
-density
150 lettre-UTC-ex.pdf
-quality
90 lettre-ex.png
;;
clean
)
echo
"Nettoyage"
latexmk
-C
rm
-rf
build __EXTERNAL_ASSETS__
*
.png
;;
*
)
echo
"Option
$1
non reconnu"
;
exit
1
;;
esac
\ No newline at end of file
get_assets.sh
deleted
100755 → 0
View file @
248976bd
#!/bin/bash
# Création du dossier des assets externes s'il le faut
rm
-rf
__EXTERNAL_ASSETS__
mkdir
__EXTERNAL_ASSETS__
cd
./__EXTERNAL_ASSETS__
# Récupération des assets
a
=
"https://gitlab.utc.fr/LaTeX-UTC/Graphismes-UTC/raw/master/logos/UTC/logo_UTC.pdf "
b
=
"https://gitlab.utc.fr/LaTeX-UTC/Graphismes-UTC/raw/master/elements/fleche/fleche.pdf "
c
=
"https://gitlab.utc.fr/LaTeX-UTC/Graphismes-UTC/raw/master/couleurs/couleurs_UTC.sty "
for
url
in
$a$b$c
do
wget
$url
if
[[
$?
-ne
0
]]
;
then
echo
"Erreure lors de la récupération des assets !"
echo
"Problème de connexion ou les assets ont été déplassés !"
exit
1
;
fi
done
cd
../
echo
"Tous les assets extérieurs nécesssaires sont opérationnels."
;
\ No newline at end of file
make_build.sh
deleted
100644 → 0
View file @
248976bd
rm
-rf
build
;
mkdir
build
;
cp
lettre-UTC.cls ./build
cp
lettre-UTC-ex.tex ./build
cp
LICENSE ./build
cp
README.md ./build
cp
-r
__EXTERNAL_ASSETS__ ./build
cp
.gitignore ./build
cp
.latexmkrc ./build
# copy for building
cp
-rf
./build ./build_tmp
# try to build
cd
./build_tmp
latexmk
-pdf
lettre-UTC-ex.tex
# if successfull
cd
../
cp
build_tmp/lettre-UTC-ex.pdf ./
rm
-rf
./build_tmp
zip
-r
latex-lettre-UTC.zip ./build
# generate preview
convert
-density
150 lettre-UTC-ex.pdf
-quality
90 lettre-ex.png
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment