#/bin/bash # CODE="5.1" V="Installer Upgrade LibreOffice $CODE" VERSION="$V Ubuntu 10.04 Lucid Lynx ke atas" BY="Andrian Dion P. " SITE="http://andrewdion.staff.ugm.ac.id" LICENSE="(C) 2012 GPL v2" APT_INSTALL="apt-get install -y" APT_REMOVE="apt-get -y remove --purge" GET="/usr/bin/wget -t inf -P" #KG_PATH="http://repo.ugm.ac.id/ekstra/.ugos_tools" PKG_PATH_X86="http://repo.ugm.ac.id/ekstra/office/libreoffice/5.1.0/deb/x86/" FILE_X86="LibreOffice_5.1.0_Linux_x86_deb.tar.gz" DIRECTORY_X86="LibreOffice_5.1.0.3_Linux_x86_deb" PKG_PATH_X86_64="http://repo.ugm.ac.id/ekstra/office/libreoffice/5.1.0/deb/x86_64/" FILE_X86_64="LibreOffice_5.1.0_Linux_x86-64_deb.tar.gz" DIRECTORY_X86_64="LibreOffice_5.1.0.3_Linux_x86-64_deb" ARSITEKTUR=`uname -m` # Make sure only root can run our script if [[ $EUID -ne 0 ]]; then sudo bash $0 exit 1 fi clear echo "$VERSION" echo "$BY" echo "$SITE" echo "$LICENSE" echo "$DATE" echo "Disarankan untuk uninstall versi sebelumnya melalui Synaptic Package Manager." read -p "Apakah Anda yakin untuk melakukan instalasi?, Enter yes or no: " RESPONSE if [ "$RESPONSE" = yes ] ; then echo "Your answered yes!" echo "Processing..." sleep 1 function install { (sleep 1 if [[ $ARSITEKTUR == "i686" ]]; then $GET /tmp/ $PKG_PATH_X86/$FILE_X86 tar xzvf /tmp/$FILE_X86 -C /tmp/ dpkg -i /tmp/$DIRECTORY_X86/DEBS/*.deb rm -rf /tmp/$DIRECTORY_X86 else $GET /tmp/ $PKG_PATH_X86_64/$FILE_X86_64 tar xzvf /tmp/$FILEX_86_64 -C /tmp/ dpkg -i /tmp/$DIRECTORYX_86_64/DEBS/*.deb rm -rf /tmp/$DIRECTORY_X86_64 fi ) } install echo "Finish..." elif [ "$RESPONSE" = no ] ; then exit 0 else echo "You did not make a valid selection!" fi