Only extract downloaded current tar archive

The current postinst has the bug that all tar archives store in /opt
that begin with ideaIC- are extracted. While this issue will not appear
to most users it may still be a problem to aborted installations which
are only continued after an update.

Fixes issue #5
This commit is contained in:
Marcel Kapfer 2021-10-01 17:31:14 +00:00
parent 846b3f45f0
commit 00e8e0ca30
Signed by: mmk2410
GPG Key ID: CADE6F0C09F21B09
2 changed files with 3 additions and 2 deletions

View File

@ -5,13 +5,13 @@ set -e
cd /opt/
## Extract the package
sudo tar xf /opt/ideaIC-*
sudo tar xf /opt/ideaIC-2021.2.2.tar.gz
## Rename the directory
sudo mv /opt/idea-IC-* /opt/intellij-idea-community
## Remove the tar.gz package
sudo rm /opt/ideaIC-*
sudo rm /opt/ideaIC-2021.2.2.tar.gz
## Install the .desktop file, if necessary
if [ -x "/usr/bin/desktop-file-install" ]; then

View File

@ -26,6 +26,7 @@ main() {
"Upstream version $new"
sed -i "s/$old/$new/g" ./debian/preinst
sed -i "s/$old/$new/g" ./debian/postinst
debuild -us -uc