jphilipz

Bash Script to Install LibreOffice Language Packs

Jun 27th, 2014
324
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/bash
  2.  
  3. # Summary : Batch script for installing LibreOffice language packs into parallel installs
  4. #         : This is to be used after using http://pastebin.com/L6SFSYFR
  5. # Version : 0.2
  6. # Author  : Yousuf Philips
  7. # Wiki    : https://wiki.documentfoundation.org/Installing_in_parallel#Linux
  8. # -----------------------
  9. # This bash script can be run within the console or in a gui file manager
  10.  
  11. if [ ! -d 'installs' ]; then
  12.    echo "No 'installs' folder found. This script must be run within the main extraction folder after previously installing using the other script.";
  13.    exit
  14. fi
  15.  
  16. cd installs
  17.  
  18. if [ -d '../DEBS' ]; then
  19.    echo "Installing DEB Language Packages"
  20.    for i in ../DEBS/*.deb; do dpkg-deb -x $i . ; done
  21.    rm ../DEBS/*.deb
  22. else
  23.    echo "Installing RPM Language Packages"
  24.    for i in ../RPMS/*.rpm; do rpm2cpio $i | cpio -id; done
  25.    rm ../RPMS/*.rpm
  26. fi
  27.  
  28. zenity --info --text="Language Packs Installed"
RAW Paste Data