
# Install4J really just appends this to it's sh script, so don't do anything we can't do in sh!
# This is appended to /var/lib/dpkg/info/lantern.postinst

logf=~/.lantern.installer.log
echo "Copying lantern.desktop so ubuntu can find it" >> $logf
echo "Arg 1 is $1"  >> $logf
echo "USER is '$USER'"  >> $logf
echo "SUDO_USER is '$SUDO_USER'"  >> $logf

cp /opt/lantern/lantern.desktop /usr/share/applications || echo "Could not copy desktop file!!"  >> $logf
chown $SUDO_USER:$SUDO_USER /opt/lantern/lantern.desktop
chown $SUDO_USER:$SUDO_USER /usr/share/applications/lantern.desktop

echo "Finished running post install script..." >> $logf


# Install4J really just appends this to it's sh script, so don't do anything we can't do in sh!
# This is appended to /var/lib/dpkg/info/lantern.postinst

sed -i s,^Icon=.*png$,Icon=/opt/lantern/128on.png, /opt/lantern/lantern.desktop
chown $SUDO_USER:$SUDO_USER /opt/lantern/lantern.desktop
cp /opt/lantern/lantern.desktop /usr/share/applications || echo "Could not copy desktop file!!"  >> $logf

echo "Finished running post install script..." >> $logf

Set 128x128 icon in lantern.desktop, remove debug stuff.
Set 128x128 icon in lantern.desktop, remove debug stuff.
