-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
legdna
committed
Dec 19, 2023
0 parents
commit 5a63753
Showing
2 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Copyright 2023 legdna | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,149 @@ | ||
#!/usr/bin/bash | ||
set -e | ||
|
||
test_sudo=$(which sudo) | ||
if [[ $? -ne 0 ]]; then | ||
printf "\e[31;1mSudo n'est pas installé sur votre machine !\e[0m\n" | ||
exit 1 | ||
fi | ||
|
||
# "black" "\e[30m" | ||
# "red" "\e[31m" | ||
# "green" "\e[32m" | ||
# "yellow" "\e[33m" | ||
# "blue" "\e[34m" | ||
# "magenta" "\e[35m" | ||
# "cyan" "\e[36m" | ||
# "light_gray" "\e[37m" | ||
# "reset" "\e[0m" | ||
# "bold" "\e[1m" | ||
# "faint" "\e[2m" | ||
# "italic" "\e[3m" | ||
# "underlined" "\e[4m" | ||
|
||
function title { | ||
printf "\e[1m | ||
_____ ___ ___ | ||
/ /::\ / /\ / /\ ___ | ||
/ /:/\:\ / /::\ / /:/_ / /\ | ||
/ /:/ \:\ / /:/\:\ / /:/ /\ / /:/ | ||
/__/:/ \__\:| / /:/~/:/ / /:/ /:/_ /__/::\ | ||
\ \:\ / /:/ /__/:/ /:/___ /__/:/ /:/ /\ \__\/\:\__ | ||
\ \:\ /:/ \ \:\/:::::/ \ \:\/:/ /:/ \ \:\/\\ | ||
\ \:\/:/ \ \::/~~~~ \ \::/ /:/ \__\::/ | ||
\ \::/ \ \:\ \ \:\/:/ /__/:/ | ||
\__\/ \ \:\ \ \::/ \__\/ | ||
\__\/ \__\/ | ||
by legdna rev.a0.1 | ||
\e[0m\n" | ||
} | ||
|
||
# Message d'erreur lors d'une syntaxe douteuse | ||
function error_syntax { | ||
printf "\e[31;1m | ||
----------------------- | ||
| Erreur de syntaxe ! | | ||
----------------------- | ||
\e[0m\n\n" | ||
} | ||
|
||
clear | ||
yes_or_no="NULL" | ||
while [[ $yes_or_no != "o" ]] && [[ $yes_or_no != "O" ]]; do | ||
distro_choice=0 | ||
while [[ $distro_choice == 0 ]] || [[ $distro_choice == -1 ]]; do | ||
title | ||
if [[ $distro_choice == -1 ]]; then | ||
error_syntax | ||
fi | ||
printf "\e[36;1m Sur quelle distribution Linux êtes-vous ?\e[0m\n" | ||
printf "\n 1. \e[31mDebian\e[0m ou équivalent (Ubuntu, Linux Mint, ...)" | ||
printf "\n 2. \e[34mFedora\e[0m ou équivalent (Bazzite, ...)" | ||
printf "\n 3. \e[36mArch Linux\e[0m ou équivalent (Manjaro, Endeavour, ...)\n" | ||
printf "\n\e[33;1m -> \e[0m"; read distro | ||
if [[ $distro =~ ^[1-3]$ ]]; then | ||
distro_choice=1 | ||
else | ||
distro_choice=-1 | ||
fi | ||
clear | ||
done | ||
|
||
if [[ $distro == 1 ]]; then | ||
printf "\n\e[33;1m Êtes-vous sûr d'être sur Debian ou équivalent ? o/N : \e[0m" | ||
read yes_or_no | ||
if [[ $yes_or_no == "o" ]] || [[ $yes_or_no == "O" ]]; then | ||
clear | ||
printf "\n\e[32;1m | ||
------------------------------------------------------------------------------------------------ | ||
| Entrez votre mot de passe utilisateur pour installer les dépendances nécessaire au programme | | ||
------------------------------------------------------------------------------------------------ | ||
\e[0m\n\n" | ||
sudo apt update -y && sudo apt upgrade -y | ||
sudo apt install -y distrobox podman fuse-overlayfs unzip | ||
else | ||
clear | ||
fi | ||
elif [[ $distro == 2 ]]; then | ||
printf "\n\e[33;1m Êtes-vous sûr d'être sur Fedora ou équivalent ? o/N : \e[0m" | ||
read yes_or_no | ||
if [[ $yes_or_no == "o" ]] || [[ $yes_or_no == "O" ]]; then | ||
clear | ||
printf "\n\e[32;1m | ||
------------------------------------------------------------------------------------------------ | ||
| Entrez votre mot de passe utilisateur pour installer les dépendances nécessaire au programme | | ||
------------------------------------------------------------------------------------------------ | ||
\e[0m\n\n" | ||
sudo dnf update -y | ||
sudo dnf install -y distrobox podman fuse-overlayfs unzip | ||
else | ||
clear | ||
fi | ||
elif [[ $distro == 3 ]]; then | ||
printf "\n\e[33;1m Êtes-vous sûr d'être sur Arch Linux ou équivalent ? o/N : \e[0m" | ||
read yes_or_no | ||
if [[ $yes_or_no == "o" ]] || [[ $yes_or_no == "O" ]]; then | ||
clear | ||
printf "\n\e[32;1m | ||
------------------------------------------------------------------------------------------------ | ||
| Entrez votre mot de passe utilisateur pour installer les dépendances nécessaire au programme | | ||
------------------------------------------------------------------------------------------------ | ||
\e[0m\n\n" | ||
sudo pacman -Suy --noconfirm distrobox podman fuse-overlayfs unzip | ||
else | ||
clear | ||
fi | ||
fi | ||
done | ||
|
||
distrobox-create --name drei --image fedora:38 | ||
distrobox-enter --name drei -- sudo dnf install -y alsa-plugins-pulseaudio libxcrypt-compat xcb-util-renderutil xcb-util-wm pulseaudio-libs xcb-util xcb-util-image xcb-util-keysyms libxkbcommon-x11 libXrandr libXtst mesa-libGLU mtdev libSM libXcursor libXi libXinerama libxkbcommon libglvnd-egl libglvnd-glx libglvnd-opengl libICE librsvg2 libSM libX11 libXcursor libXext libXfixes libXi libXinerama libxkbcommon libxkbcommon-x11 libXrandr libXrender libXtst libXxf86vm mesa-libGLU mtdev pulseaudio-libs xcb-util alsa-lib apr apr-util fontconfig freetype libglvnd fuse-libs fuse rocm-opencl | ||
|
||
clear | ||
printf "\e[36;1m\n | ||
---------------------------------------------------------------------------------------------------------------- | ||
| Téléchargez votre version de DaVinci Resolve sur https://www.blackmagicdesign.com/fr/products/davinciresolve | | ||
---------------------------------------------------------------------------------------------------------------- | ||
\e[0m\e[33;1m | ||
Une fois fait glisser déposer le fichier téléchargé ici : \e[0m" | ||
read davinci_path | ||
|
||
davinci_path="${davinci_path//\'/}" | ||
unzip -f $davinci_path | ||
distrobox-enter --name drei -- sudo "${davinci_path//zip/run}" -iy | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libglib-2.0.so" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libglib-2.0.so.0" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libglib-2.0.so.0.6800.4" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libgio-2.0.so" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libgio-2.0.so.0" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libgio-2.0.so.0.6800.4" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libgmodule-2.0.so" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libgmodule-2.0.so.0" | ||
distrobox-enter --name drei -- sudo rm -rf "/opt/resolve/libs/libgmodule-2.0.so.0.6800.4" | ||
distrobox-enter --name drei -- distrobox-export -a /opt/resolve/bin/resolve | ||
clear | ||
|
||
printf "\n\e[32;1m L'installation s'est terminée avec succès !\e[0m\n\n" |