2015-12-08 11:55:30 +01:00
|
|
|
#!/bin/bash
|
2017-02-02 13:58:56 +01:00
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2015-12-08 11:55:30 +01:00
|
|
|
cd /opt/
|
|
|
|
|
|
|
|
## Extract the package
|
|
|
|
sudo tar xf /opt/ideaIC-*
|
|
|
|
|
|
|
|
## Rename the directory
|
|
|
|
sudo mv /opt/idea-IC-* /opt/intellij-idea-community
|
|
|
|
|
|
|
|
## Remove the tar.gz package
|
|
|
|
sudo rm /opt/ideaIC-*
|
|
|
|
|
2017-01-02 19:10:17 +01:00
|
|
|
## Install the .desktop file, if necessary
|
|
|
|
if [ -x "/usr/bin/desktop-file-install" ]; then
|
2017-02-02 13:58:56 +01:00
|
|
|
sudo desktop-file-install /usr/share/applications/intellij-idea-community.desktop
|
2017-01-02 19:10:17 +01:00
|
|
|
fi
|
2017-02-02 13:58:56 +01:00
|
|
|
|
2017-03-24 15:00:47 +01:00
|
|
|
## Switch to new repository, if necessary
|
|
|
|
oldrepo="mmk2410\/intellij-idea-community"
|
|
|
|
newrepo="mmk2410\/intellij-idea"
|
|
|
|
grep -rl "$oldrepo" /etc/apt/sources.list | xargs -r sed -i "s/$oldrepo/$newrepo/g"
|
|
|
|
grep -rl "$oldrepo" /etc/apt/sources.list.d/ | xargs -r sed -i "s/$oldrepo/$newrepo/g"
|
|
|
|
|
2017-02-02 13:58:56 +01:00
|
|
|
##DEBHELPER##
|