Last active
April 13, 2024 19:08
-
-
Save pchan37/0359146d5ad63167eb65e6ba9eed67e2 to your computer and use it in GitHub Desktop.
Install WPS Office on Linux including the missing symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
echo 'WPS Office installation script brought to you by PChan!' | |
echo 'Downloading WPS Office!' | |
wget -q http://kdl1.cache.wps.com/ksodl/download/linux/a21//wps-office_10.1.0.5707~a21_amd64.deb | |
echo 'Downloading the symbols for WPS Office!' | |
wget -q https://github.com/IamDH4/ttf-wps-fonts/archive/master.zip | |
echo 'Installing WPS Office!' | |
sudo dpkg -i wps-office_10.1.0.5707~a21_amd64.deb | |
rm wps-office_10.1.0.5707~a21_amd64.deb | |
echo 'Installing the symbols for WPS Office!' | |
unzip master.zip | |
cd ttf-wps-fonts-master && sudo bash install.sh | |
cd .. | |
rm -rf ttf-wps-fonts-master | |
rm master.zip | |
if command -v plank > /dev/null; then | |
read -r -p "Do you want to install the launchers for the dock? [Y/N] " response | |
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]] | |
then | |
rm -rf ~/wps | |
mkdir -p ~/wps | |
cp /usr/share/applications/wps-office-et.desktop ~/wps/ | |
cp /usr/share/applications/wps-office-wpp.desktop ~/wps/ | |
cp /usr/share/applications/wps-office-wps.desktop ~/wps/ | |
chmod a+x ~/wps/* | |
DOCKITEM_FILE_CONTENT='[PlankDockItemPreferences]\nLauncher=file:///home/<username>/wps' | |
TAILORED_DOCKITEM_FILE_CONTENT="${DOCKITEM_FILE_CONTENT/<username>/$(whoami)}" | |
echo -en $TAILORED_DOCKITEM_FILE_CONTENT > ~/.config/plank/dock1/launchers/wps.dockitem | |
echo 'Success!' | |
fi | |
echo 'Done!' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment