#!/bin/bash # # Quick and easy install of my favorite programs # # set version here each time we update the most recent changelog version=2016.1129.01 echo "*** 2016 development script ***" debug_mode=false # List packages only? action_list_packages=false # When listing packages, present in html format? action_list_packages_in_html=false # action_query_only=false # Define here so they are global install_packages_list="" remove_packages_list="" function debug_echo { if [[ $debug_mode == true ]] then echo "$1" fi } # Check for root user function only_run_as_root { if [[ $UID != 0 ]] then echo "You must be root or use 'sudo' to run this program." exit 1 fi } function exit_if_not_fedora_25 { if [[ ! -f /etc/fedora-release || \ "$(cat /etc/fedora-release)" != "Fedora release 25 (Twenty Five)" ]] then echo "Error: This script only works with Fedora Release 25" exit 1 fi } function install_rpm_fusion { if [[ ! -f /etc/yum.repos.d/rpmfusion-free.repo || ! -f /etc/yum.repos.d/rpmfusion-free.repo ]] then if [[ ! -f /etc/yum.repos.d/rpmfusion-free.repo ]] then wget -nc https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-25.noarch.rpm fi if [[ ! -f /etc/yum.repos.d/rpmfusion-nonfree.repo ]] then wget -nc https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-25.noarch.rpm fi dnf -y install ./rpmfusion-free-release-25.noarch.rpm ./rpmfusion-nonfree-release-25.noarch.rpm fi } function check_installed { # check to see if package is installed, # if yes, it will print the full package name # if no, it will include the words 'not installed' in the output if [[ `rpm -q ${1} | grep "not installed" | wc -l` -gt 0 ]] then return 0 else return 1 fi } function populate_remove_list { # Set to empty install_packages_list="" remove_packages_list="" # packages to remove: the annoyingly slow command-not-found remove_packages_list="$remove_packages_list PackageKit-command-not-found" # fonts I don't use that are installed by default remove_packages_list="$remove_packages_list khmeros-fonts-common khmeros-base-fonts lohit-devangari sil-abyssinica-fonts sil-padauk-fonts lohit-kannada smc-meera-fonts paktype-naqsh lohit-assamese thai-scalable-fonts-common lklug-fonts lohit-telugu wqy-zenhei paratype-pt-sans thai-scalable-waree lohit-tamil cjkuni-uming lohit-punjabi jomolhari lohit-gujarati lohit-gujarati-fonts lohit-oriya-fonts lohit-punjabi-fonts lohit-assamese-fonts sil-nuosu-fonts cjkuni-uming-fonts nhn-nanum-gothic-fonts lohit-tamil-fonts wqy-zenhei-fonts lohit-devanagari-fonts lohit-telugu-fonts lohit-bengali-fonts paktype-naqsh-fonts lohit-kannada-fonts jomolhari-fonts paratype-pt-sans-fonts smc-fonts-common lohit-malayalam-fonts tabish-eeyek nhn-nanum sil-mingzat" } function populate_install_list { # MULTIMEDIA install_packages_list="$install_packages_list lame grip rhythmbox gstreamer-ffmpeg gstreamer-plugins-ugly gstreamer-plugins-bad gstreamer-plugins-bad-nonfree amarok mplayer mplayer-gui mencoder xine-ui gxine xine-lib-extras vlc easytag k3b k3b-extras-freeworld banshee smplayer mp3splt libmp3splt" # GSTREAMER backends install_packages_list="$install_packages_list gstreamer-plugins-good-extras gstreamer-plugins-good gstreamer-plugins-base-tools gstreamer-plugins-base gstreamer-plugins-bad-free gstreamer gstreamer-plugins-ugly gstreamer1-plugins-bad-freeworld gstreamer1-plugins-good-extras gstreamer1-plugins-good gstreamer1-libav gstreamer1-plugins-base-tools gstreamer1-plugins-base gstreamer1-plugins-bad-free gstreamer1 gstreamer1-plugins-ugly" # APACHE HTTPD install_packages_list="$install_packages_list httpd httpd-tools" # REMOTE ACCESS install_packages_list="$install_packages_list tigervnc-server remmina remmina-plugins-rdp remmina-plugins-nx remmina-plugins-vnc" # MISC CLI TOOLS install_packages_list="$install_packages_list expect pv" # PASSWORD MANAGEMENT install_packages_list="$install_packages_list pass keepassx" # SSH CLIENTS install_packages_list="$install_packages_list openssh-server openssh-clients" # TEXT FILE EDITING install_packages_list="$install_packages_list meld vim-X11 vim-enhanced dos2unix" # PERFORMANCE install_packages_list="$install_packages_list atop jnettop iptraf-ng strace ntop htop fio" # KVM VIRTUALIZATION install_packages_list="$install_packages_list qemu-kvm virt-manager virt-top libvirt-daemon-qemu virt-viewer libguestfs-tools virt-what" # KERNEL SOURCE (required by VIRTUALBOX) install_packages_list="$install_packages_list kernel-headers kernel-devel gcc dkms" # HARDWARE install_packages_list="$install_packages_list lm_sensors bonnie++ lsscsi sysstat powertop screenfetch" # CHAT install_packages_list="$install_packages_list pidgin pidgin-sipe pidgin-logviewer pidgin-libnotify pidgin-otr" # OFFICE install_packages_list="$install_packages_list libreoffice-writer libreoffice-calc libreoffice-base libreoffice-impress libreoffice-draw" # GRAPHICS install_packages_list="$install_packages_list gcolor2 gimp gimp-data-extras ufraw-gimp" # NETWORKING install_packages_list="$install_packages_list nmap mtr mtr-gtk wget openvpn NetworkManager-openvpn gftp tsocks proxychains-ng proxytunnel telnet firewall-config" # FILE ARCHIVING install_packages_list="$install_packages_list unzip unrar" # SERIAL COMMUNICATIONS install_packages_list="$install_packages_list conserver-client minicom" # STORAGE install_packages_list="$install_packages_list gparted" # GUI ENVIRONMENT install_packages_list="$install_packages_list gnome-tweak-tool alacarte dconf-editor wmctrl xbacklight" # GUI Terminals install_packages_list="$install_packages_list terminator" # GUI Terminal Terminix #install_packages_list="$install_packages_list terminix" # SHELL PROMPTS install_packages_list="$install_packages_list powerline powerline-fonts vim-powerline" # VERSION CONTROL install_packages_list="$install_packages_list git gitg" # GO LANGUAGE install_packages_list="$install_packages_list golang vim-go" # SAMBA CIFS SERVER install_packages_list="$install_packages_list samba-client samba-common samba" # NEMO FILE MANAGER install_packages_list="$install_packages_list nemo nemo-extensions" # MISC GNOME APPLICATIONS install_packages_list="$install_packages_list gnome-music gnome-photos gnome-maps gnome-weather bijiben" # PANORAMIC AND HDR PHOTOGRAPHY install_packages_list="$install_packages_list hugin darktable luminance-hdr" # DOCKER install_packages_list="$install_packages_list docker docker-client docker-vim docker-logrotate" # VAGRANT install_packages_list="$install_packages_list vagrant" # LDAP CLIENTS install_packages_list="$install_packages_list openldap-clients" } function list_packages { if [[ $action_list_packages ]] then for each_package in $install_packages_list do if [[ $action_list_packages_in_html ]] then echo "