Skip to content

Instantly share code, notes, and snippets.

@Justinzobel
Created February 15, 2020 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Justinzobel/c08d339197df501e33318256e125bd37 to your computer and use it in GitHub Desktop.
Save Justinzobel/c08d339197df501e33318256e125bd37 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir -p OpenOffice/data
tar xf Apache_OpenOffice_*_Linux_x86-64_install-deb_en-US.tar.gz
mv en-US/DEBS/*.deb OpenOffice/
cd OpenOffice/
for i in $(ls -1 openoffice*)
do
mkdir Deb-${i}
mv ${i} Deb-${i}/
pushd Deb-${i} > /dev/null
ar xf *.deb
mkdir data
tar xf data.tar.gz -C data/
cp -r data/* ../data/
popd > /dev/null
done
if [[ -e /opt ]];then echo;else sudo mkdir /opt;fi
sudo cp -r data/opt/openoffice4 /opt/
cd ..
rm -rf OpenOffice
pushd en-US/DEBS/desktop-integration/ > /dev/null
ar xf openoffice4.1-debian-menus_*_all.deb
tar xf data.tar.gz
sudo cp usr/share/applications/* /usr/share/applications/
popd > /dev/null
rm -rf en-US
@Justinzobel
Copy link
Author

Assumes you've downloaded the latest 64bit deb in the current directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment