-
Notifications
You must be signed in to change notification settings - Fork 1
/
pycharm-build.sh
executable file
·43 lines (30 loc) · 1.49 KB
/
pycharm-build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#!/bin/bash
pycharm_version=$(cat pycharm_ver)
# Download PyCharm and Android plugin(required for building PyCharm)
wget https://github.com/JetBrains/intellij-community/archive/refs/tags/pycharm/$pycharm_version.tar.gz -O pycharm-source.tar.gz
git clone --depth 1 --branch pycharm/$pycharm_version git://git.jetbrains.org/idea/android.git
# Extract files
tar -xf pycharm-source.tar.gz
rm -rf android/.git/
find android/ -type f -exec sha256sum {} + | awk '{print $1}' | sort | sha256sum | awk '{print $1}' > checksum_bv
if [[ $(cat checksum_bv) == $(cat checksum_android) ]]
then
echo "Android plugin checksum verification completed"
echo "Checksum is $(cat checksum_bv)"
mv android intellij-community-pycharm-$pycharm_version
# Some needed modifications
cd intellij-community-pycharm-$pycharm_version
sed '/String targetOS/c String targetOS = OS_LINUX' -i platform/build-scripts/groovy/org/jetbrains/intellij/build/BuildOptions.groovy
sed 's|../build/plugins-autoupload.txt|plugins-autoupload.txt|' -i platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/DistributionJARsBuilder.groovy
touch plugins-autoupload.txt
sed 's|intellij.pycharm.community.build|"$(cd "$(dirname "$0")"; pwd)/../" intellij.pycharm.community.build|' -i python/installers.cmd
echo $pycharm_version > build.txt
# Build
./python/installers.cmd -Dintellij.build.target.os=linux
# Clean up
cd ..
rm pycharm-source.tar.gz
rm checksum_bv
else
echo "Downloaded Android plugin maybe corrupted."
fi