From 987662a7c4540468071e38659768f1b456f40342 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Fri, 1 Oct 2021 17:53:28 +0000 Subject: [PATCH] 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. See also https://gitlab.com/mmk2410/intellij-idea-community/-/issues/5 --- intellij-idea-ultimate_2021.2.2/debian/postinst | 4 ++-- update-new-version.sh | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/intellij-idea-ultimate_2021.2.2/debian/postinst b/intellij-idea-ultimate_2021.2.2/debian/postinst index f61142d..bdc49f1 100644 --- a/intellij-idea-ultimate_2021.2.2/debian/postinst +++ b/intellij-idea-ultimate_2021.2.2/debian/postinst @@ -5,13 +5,13 @@ set -e cd /opt/ ## Extract the package -sudo tar xf /opt/ideaIU-* +sudo tar xf /opt/ideaIU-2021.2.2.tar.gz ## Rename the directory sudo mv /opt/idea-IU-* /opt/intellij-idea-ultimate ## Remove the tar.gz package -sudo rm /opt/ideaIU-* +sudo rm /opt/ideaIU-2021.2.2.tar.gz ## Install the .desktop file, if necessary if [ -x "/usr/bin/desktop-file-install" ]; then diff --git a/update-new-version.sh b/update-new-version.sh index 88c61a2..3351945 100755 --- a/update-new-version.sh +++ b/update-new-version.sh @@ -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