Libre Install Shafted Package System Broke

After using latest Ubuntu PPA for Libre Office & running into a dependency issue I unmarked the PPA under Software Sources & purged Libre. However I am stuck with corresponding error in terminal;

$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  libreoffice-base
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 7,234 kB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 334746 files and directories currently installed.)
Removing libreoffice-base ...
No diversion 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by libreoffice-base', none removed.
No diversion 'diversion of /usr/lib/libreoffice/share/basic/script.xlc to /usr/lib/libreoffice/share/basic/script.xlc.noaccess by libreoffice-base', none removed.
/var/lib/dpkg/info/libreoffice-base.postrm: 31: /var/lib/dpkg/info/libreoffice-base.postrm: Syntax error: end of file unexpected (expecting "fi")
dpkg: error processing libreoffice-base (--remove):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 libreoffice-base
E: Sub-process /usr/bin/dpkg returned an error code (1)

Package manager is broke on this error & will not load.

sudo dpkg --force-all -P libreoffice-base
(Reading database ... 334746 files and directories currently installed.)
Removing libreoffice-base ...
No diversion 'diversion of /usr/lib/libreoffice/share/basic/dialog.xlc to /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess by libreoffice-base', none removed.
No diversion 'diversion of /usr/lib/libreoffice/share/basic/script.xlc to /usr/lib/libreoffice/share/basic/script.xlc.noaccess by libreoffice-base', none removed.
/var/lib/dpkg/info/libreoffice-base.postrm: 31: /var/lib/dpkg/info/libreoffice-base.postrm: Syntax error: end of file unexpected (expecting "fi")
dpkg: error processing libreoffice-base (--purge):
 subprocess installed post-removal script returned error exit status 2
Errors were encountered while processing:
 libreoffice-base

/var/lib/dpkg/info/libreoffice-base.postrm;

!/bin/sh

set -e


if [ "$1" = remove -o "$1" = abort-install -o "$1" = disappear ]; then
	dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
		--divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \
                        /usr/lib/libreoffice/share/basic/dialog.xlc
	dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
		--divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \
                        /usr/lib/libreoffice/share/basic/script.xlc
fi
if [ "$1" = abort-upgrade ] && dpkg --compare-versions "$2" lt dpkg --compare-versions "$2" lt 1:4.3.0~beta1-1; then
	dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
		--divert /usr/lib/libreoffice/share/basic/dialog.xlc.noaccess \
                        /usr/lib/libreoffice/share/basic/dialog.xlc
	dpkg-divert --package $DPKG_MAINTSCRIPT_PACKAGE --remove --rename \
		--divert /usr/lib/libreoffice/share/basic/script.xlc.noaccess \
fi

# Automatically added by dh_installmime
if which update-mime >/dev/null 2>&1; then update-mime; fi
# End automatically added section
# Automatically added by dh_installmenu
if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
# End automatically added section


exit 0

There seems to be a line missing from this maintenance script file:

/var/lib/dpkg/info/libreoffice-base.postrm
The missing line,

/usr/lib/libreoffice/share/basic/script.xlc
needs to be added to the end of the file’s second if statement, just above the closing fi.