| #!/bin/bash |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| function prepare_setPackages { |
| |
| local PACKAGES_REQUIRED="inkscape ImageMagick netpbm |
| netpbm-progs syslinux gimp coreutils texinfo texinfo-tex info |
| tetex-latex tetex-fonts tetex-xdvi tetex-dvips gettext texi2html |
| gnome-doc-utils elinks docbook-style-xsl docbook-utils |
| docbook-dtds docbook-style-dsssl docbook-simple docbook-utils-pdf |
| docbook-slides firefox sudo yum rpm ctags vim-enhanced asciidoc |
| dblatex" |
| |
| local -x PACKAGES_THIRDPARTY='(inkscape|asciidoc|dblatex)' |
| |
| for PACKAGE in ${PACKAGES_REQUIRED};do |
| rpm -q ${PACKAGE} --quiet |
| if [[ $? -ne 0 ]];then |
| PACKAGES_UNINSTALLED="${PACKAGES_UNINSTALLED} ${PACKAGE}" |
| fi |
| done |
| |
| local YUM_OPTIONS='' |
| if [[ ${TCAR_FLAG_YES} == 'true' ]];then |
| YUM_OPTIONS='-y' |
| fi |
| if [[ ${TCAR_FLAG_QUIET} == 'true' ]];then |
| YUM_OPTIONS="${YUM_OPTIONS} --quiet" |
| fi |
| |
| if [[ ! -z ${PACKAGES_UNINSTALLED} ]];then |
| tcar_printMessage "`gettext "The following packages need to be installed:"`" --as-banner-line |
| for PACKAGE in ${PACKAGES_UNINSTALLED};do |
| if [[ ${PACKAGE} =~ ${PACKAGES_THIRDPARTY} ]];then |
| tcar_printMessage "${PACKAGE} (`gettext "from third party repository"`)" --as-response-line |
| else |
| tcar_printMessage "${PACKAGE}" --as-response-line |
| fi |
| done |
| tcar_printMessage '-' --as-separator-line |
| tcar_printMessage "`gettext "Do you want to continue"`" --as-yesornorequest-line |
| sudo yum install ${YUM_OPTIONS} ${PACKAGES_UNINSTALLED} |
| else |
| tcar_printMessage "`gettext "All required packages are already installed."`" --as-banner-line |
| fi |
| |
| } |