En fait dans l'idée c'est pour me simplifier l'installation de fedora chez des amis mais également pour les débutants.
Et j'ai fait un script général avec les dépôts et les logiciels les plus courrants, surtout ceux qui ne sont pas présents par défaut dans les dépôts.
Oui l'intégration de l'architecture est prévus ainsi que tes différentes propositions.
@admin
Ce post peut-il être déplacé dans la section compoire du libre ?
car en fait il est bien plus généraliste qu'un simple installation de driver.
Et j'ai fait un script général avec les dépôts et les logiciels les plus courrants, surtout ceux qui ne sont pas présents par défaut dans les dépôts.
#!/bin/sh
#Script écrit par coRe*
###### SECTION GENERALS VARIABLES :
ASKROOT="Enter root password to continue :"
ARCH=$(uname -m)
BAN_TOP="################################################################################"
BAN_SIN="######################################################### script by coRe* ######"
BAN_CEL="# "
BAN_CER=" #"
BAN_NOR="# #"
MSG_NV_2="You are going to $MSG_NV_CHO $softwares $section"
MSG_NV_2="$MSG_NV_CHO $softwares $section complet."
###### END SECTION ######
###### SECTION WINDOWS FUNCTIONS :
#Nvidia chose :
nvidia_chose(){
if [ "$nvidia" = "uninstall" ];then
MSG_NV_CHO="Uninstall"
else
MSG_NV_CHO="Install"
fi
#
#Start Window
window_start(){
MSG_1="Hello $USER,"
MSG_2=" Welcome to Fedora install assistant"
window_80x8_start
press_enter
}
#
##Presentation window 80x10:
window_80x5(){
clear
echo "$BAN_TOP"
echo "$BAN_NOR"
echo -n "$BAN_CEL" "$MSG_1" "$BAN_CER"
echo "$BAN_NOR"
echo "$BAN_SIN"
echo
}
#
##Presentation window 80x10:
window_80x10(){
clear
echo "$BAN_TOP"
echo "$BAN_NOR"
echo "$BAN_NOR"
echo "$BAN_NOR"
echo "$BAN_NOR"
echo -n "$BAN_CEL" "$MSG_1" "$BAN_CER"
echo "$BAN_NOR"
echo "$BAN_NOR"
echo "$BAN_NOR"
echo "$BAN_SIN"
echo
}
#
##Presentation window 80x10:
window_80x8_start(){
clear
echo "$BAN_TOP"
echo "$BAN_NOR"
echo "# " "$MSG_1" " #"
echo "$BAN_NOR"
echo "# " " $MSG_2" " #"
echo "$BAN_NOR"
echo "$BAN_SIN"
echo
}
#
###### END SECTION ######
###### SECTION GENERALS FUNCTIONS :
#Press enter to continue :
press_enter(){
read -p "Press [Enter] key to continue ..."
}
#Ask root :
ask_root(){
MSG_1="$ASKROOT"
window_80x5
echo
}
#
#Sortie sans installation
exit_install(){
MSG_1="Nothing done..."
window_80x5
press_enter
goodbye
}
#
#A bientot
goodbye(){
MSG_1="Goodbye..."
window_80x5
press_enter
}
#
#A bientot
reboot(){
MSG_1="Your going to RESTART..."
window_80x5
echo
echo "You should save yours running jobs before"
press_enter
}
#
#
#Reboot question :
ask_reboot(){
MSG_1="Do you want to reboot, now"
window_80x5
echo
select reboot in oui non
do
case $reboot in
"oui" ) reboot goodbye ; su -c 'reboot' ; break ;;
"non" ) goodbye ;exit ; break ;;
* ) echo "Please enter 1 or 2" ;;
esac
done
}
#
###### END SECTION ######
###### SECTION MENU FUNCTIONS :
#Start Menu :
start_menu(){
MSG_1="Chose a categorie to continue..."
window_80x5
echo
select section in Repositories Drivers Softwares Exit
do
case $section in
"Repositories") repositories_menu ; break ;;
"Drivers") drivers_menu ; break ;;
"Softwares") softwares_menu ; break;;
"Exit") exit_install ; break ;;
* ) echo "Please enter a write value, like 1,2 or 3";;
esac
done
}
#
#Repositories Menu :
repositories_menu(){
MSG_1="Chose a $section to continue..."
window_80x5
echo
select repositories in RPM\ Fusion livna adobe all back
do
case $repositories in
"RPM Fusion") install_rpmfusion ; break ;;
"livna") install_livna ; break;;
"adobe") install_adobe ; break;;
"all") install_all_repositories ; break ;;
"back") start_menu ; break;;
* ) echo "Please enter a write value, like 1,2,3 or 4";;
esac
done
}
#
#Drivers Menu :
drivers_menu(){
MSG_1="Chose a $section to continue..."
window_80x5
echo
select driver in NVIDIA ATI back
do
case $driver in
"NVIDIA") install_nvidia ; break ;;
"ATI") install_ati ; break;;
"back") start_menu ; break;;
* ) echo "Please enter a write value, like 1,2 or 3";;
esac
done
}
#
#Go back Menu:
go_back_menu(){
MSG_1="Do you want to return to MENU..."
window_80x5
echo
select gobackmenu in Yes No
do
case $gobackmenu in
"Yes") start_menu ; break;;
"No") goodbye ; break ;;
* ) echo "Please enter a write value, like 1 or 2";;
esac
done
}
#
#Softwares Menu:
softwares_menu(){
MSG_1="Chose a $section to continue..."
window_80x5
echo
select softwares in Skype Handbrake Gstreamer Flash-plugin vlc all back
do
case $softwares in
"Skype") install_skype ; break ;;
"Handbrake") install_handbrake ; break;;
"Gstreamer") install_gstreamer ; break;;
"Flash-plugin") install_flashplugin ; break;;
"vlc") install_vlc ; break;;
"all") install_all_softwares ; break;;
"back") start_menu ; break;;
* ) echo "Please enter a write value, like 1,2,3,4,5,6 or 7";;
esac
done
}
#Nvidia Menu :
nvidia_menu(){
MSG_1="Chose a $driver option to continue..."
window_80x5
echo
select nvidia in kmod-nvidia akmod-nvidia akmod-nvidia-patch uninstall sortie
do
case $nvidia in
"kmod-nvidia") install_kmod ; ask_reboot ; break ;;
"akmod-nvidia") install_akmod ; ask_reboot ; break ;;
"akmod-nvidia-patch") install_akmod_patch ; ask_reboot ; break ;;
"uninstall") uninstall_nvidia ; ask_reboot ; break ;;
"sortie") exit_install ; break;;
* ) echo "";;
esac
done
nvidia_chose
}
#
###### END SECTION ######
###### SECTION SOFTWARES :
#Install Skype :
install_skype(){
MSG_1="You are going to install $softwares $section"
window_80x5
press_enter
ask_root
su -c 'yum install --nogpgcheck http://download.skype.com/linux/skype-4.2.0.11-fedora.i586.rpm '
echo
press_enter
MSG_1="Install $softwares $section complet."
window_80x5
go_back_menu
}
#
#Install Handbrake :
install_handbrake(){
MSG_1="You are going to install $softwares $section"
window_80x5
press_enter
ask_root
su -c 'wget http://negativo17.org/repos/fedora-handbrake.repo -O \
/etc/yum.repos.d/fedora-handbrake.repo&&yum install HandBrake-gui'
echo
press_enter
MSG_1="Install $softwares $section complet."
window_80x5
go_back_menu
}
#
#Install Gstreamer :
install_gstreamer(){
MSG_1="You are going to install $softwares $sections"
window_80x5
press_enter
ask_root
su -c 'yum install gstreamer-ffmpeg gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer1-libav gstreamer1-plugins-ugly '
echo
press_enter
MSG_1="Install $softwares $section complet."
window_80x5
go_back_menu
}
#
#Install vlc :
install_vlc(){
MSG_1="You are going to install $softwares $sections"
window_80x5
press_enter
ask_root
su -c 'yum install vlc '
echo
press_enter
MSG_1="Install $softwares $section complet."
window_80x5
go_back_menu
}
#
#Install Flash-plugin :
install_flashplugin(){
MSG_1="You are going to install $softwares $sections"
window_80x5
press_enter
ask_root
su -c 'yum install flash-plugin '
echo
press_enter
MSG_1="Install $softwares $section complet."
window_80x5
go_back_menu
}
#
#Install All :
install_all_softwares(){
MSG_1="You are going to install $softwares $sections"
window_80x5
press_enter
ask_root
su -c 'wget http://negativo17.org/repos/fedora-handbrake.repo -O \
/etc/yum.repos.d/fedora-handbrake.repo&&yum install --nogpgcheck vlc gstreamer-ffmpeg gstreamer-plugins-bad gstreamer-plugins-ugly gstreamer1-libav gstreamer1-plugins-ugly HandBrake-gui http://download.skype.com/linux/skype-4.2.0.11-fedora.i586.rpm '
echo
press_enter
MSG_1="Install $softwares $section complet."
window_80x5
go_back_menu
}
#
###### END SECTION ######
###### SECTION REPOSITORIES :
#Install RPM Fusion :
install_rpmfusion(){
MSG_1="You are going to install $repositories $section"
window_80x5
press_enter
ask_root
su -c 'yum install --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm '
echo
press_enter
MSG_1="Install $repositories $section complet."
window_80x5
go_back_menu
}
#
#Install livna :
install_livna(){
MSG_1="You are going to install $repositories $section"
window_80x5
press_enter
ask_root
su -c 'yum install --nogpgcheck http://rpm.livna.org/livna-release.rpm '
echo
press_enter
MSG_1="Install $repositories $section complet."
window_80x5
go_back_menu
}
#
#Install adobe :
install_adobe(){
MSG_1="You are going to install $repositories $section"
window_80x5
press_enter
ask_root
su -c 'yum install --nogpgcheck http://linuxdownload.adobe.com/adobe-release/adobe-release-$ARCH-1.0-1.noarch.rpm '
echo
press_enter
MSG_1="Install $repositories $section complet."
window_80x5
go_back_menu
}
#
#Install all repositories :
install_all_repositories(){
MSG_1="You are going to install $repositories $section"
window_80x5
press_enter
ask_root
su -c 'yum install --nogpgcheck http://linuxdownload.adobe.com/adobe-release/adobe-release-$ARCH-1.0-1.noarch.rpm http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm http://rpm.livna.org/livna-release.rpm '
echo
press_enter
MSG_1="Install $repositories $section complet."
window_80x5
go_back_menu
}
#
###### END SECTION ######
###### SECTION NVIDIA FUNCTIONS:
#Installation du kmod-nvidia :
install_kmod(){
MSG_1="$MSG_NV_1"
window_80x5
press_enter
su -c 'yum install kmod-nvidia'
echo
press_enter
MSG_1="$MSG_NV_2"
window_80x5
go_back_menu
}
#
#Installation du akmod-nvidia :
install_akmod(){
MSG_1="$MSG_NV_1"
window_80x5
press_enter
su -c 'yum insall akmod-nvidia '
echo
press_enter
MSG_1="$MSG_NV_2."
window_80x5
go_back_menu
}
#
#Installation du akmod-nvidia patché :
install_akmod_patch(){
MSG_1="$MSG_NV_1"
window_80x5
press_enter
su -c 'yum install http://www.linux-ati-drivers.homecall.co.uk/nvidia_3.11-kernel/akmod-nvidia-319.32-3.fc19.x86_64.rpm '
echo
press_enter
MSG_1="$MSG_NV_2"
window_80x5
go_back_menu
}
#
#uninstall du driver :
uninstall_nvidia(){
MSG_1="$MSG_NV_1"
window_80x5
press_enter
ask_root
su -c 'yum remove "nvidia-settings" "nvidia-xconfig" "*kmod-nvidia" "xorg*nvidia*"'
echo
MSG_1="$MSG_NV_2"
window_80x5
go_back_menu
}
#
##### END SECTION
##### SECTION SCRIPTS SECONDAIRE :
install_nvidia(){
nvidia_menu
}
#
##### END SECTION
##### SECTION SCRIPT GENERAL :
window_start
start_menu
clear
exit 1
##### END SECTION
@CabSubOui l'intégration de l'architecture est prévus ainsi que tes différentes propositions.
@admin
Ce post peut-il être déplacé dans la section compoire du libre ?
car en fait il est bien plus généraliste qu'un simple installation de driver.