#!/bin/bash VERSION="4.0.0" mkdir -p "$VERSION/"{32,64} mkdir tmp tar -xf "LibreOffice_"$VERSION"_Linux_x86_rpm.tar.gz" -C tmp/ tar -xf "LibreOffice_"$VERSION"_Linux_x86_rpm_langpack_de.tar.gz" -C tmp/ tar -xf "LibreOffice_"$VERSION"_Linux_x86_rpm_helppack_de.tar.gz" -C tmp/ find tmp -type f -name "*README*" -exec mv {} "$VERSION/32/" \; find tmp -type f -name "*.rpm" -exec mv {} "$VERSION/32/" \; rm "$VERSION"/32/*freedesktop* "$VERSION"/32/*mandriva* rm -rf tmp mkdir tmp tar -xf "LibreOffice_"$VERSION"_Linux_x86-64_rpm.tar.gz" -C tmp/ tar -xf "LibreOffice_"$VERSION"_Linux_x86-64_rpm_langpack_de.tar.gz" -C tmp/ tar -xf "LibreOffice_"$VERSION"_Linux_x86-64_rpm_helppack_de.tar.gz" -C tmp/ find tmp -type f -name "*README*" -exec mv {} "$VERSION/64/" \; find tmp -type f -name "*.rpm" -exec mv {} "$VERSION/64/" \; rm "$VERSION"/64/*freedesktop* "$VERSION"/64/*mandriva* rm -rf tmp