-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinux_builder.sh
executable file
·43 lines (34 loc) · 1.08 KB
/
linux_builder.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
# Script bash pour la distribution de CrubsRunner sur Linux
# Ce script est a executer depuis le dossier CrubsRunner
rm -rf build dist # On fait le menage
echo "execute : python3 -m PyInstaller setup.spec"
echo ""
python3 -m PyInstaller setup.spec
if [ -e dist/CrubsRunner ] # On verifie que le fichier binaire a bien ete cree
then
echo ""
echo "Compilation reussie"
echo ""
echo "Copie des fichiers et dossier vers CrubsRunner_Linux"
mkdir CrubsRunner_Linux
cp dist/CrubsRunner CrubsRunner_Linux/CrubsRunner
cp -r icon/ CrubsRunner_Linux/icon/
cp -r 3d_files/ CrubsRunner_Linux/3d_files/
cp linux_installer.sh CrubsRunner_Linux/linux_installer.sh
cp LICENSE CrubsRunner_Linux/LICENSE
echo ""
echo "Creation du README.txt"
echo "Pour installer CrubsRunner, executez : bash linux_installer.sh" >> CrubsRunner_Linux/README.txt
echo ""
echo "Compression du dossier"
tar -zcvf CrubsRunner_Linux.tar.gz CrubsRunner_Linux
echo ""
echo "Construction terminee"
exit 0
else
rm -rf build/ dist/
echo ""
echo "Compilation echouee"
exit 1
fi