forked from mschieder/idea-code-formatter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrepackage_ide.sh
More file actions
50 lines (42 loc) · 1.54 KB
/
repackage_ide.sh
File metadata and controls
50 lines (42 loc) · 1.54 KB
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
44
45
46
47
48
49
50
#!/bin/bash
VERSION=$1
DOWNLOAD_DIR=$(pwd)/downloaded_ides
DEST_ZIP=repackaged/ide.zip
DEST_DIR=idea-code-formatter/downloaded_jars
if test -f "$DEST_DIR/$DEST_ZIP"; then
echo "$DEST_DIR/$DEST_ZIP already exists. Skipping ide.zip creation."
exit 0
fi
mkdir -p $DEST_DIR
cd $DEST_DIR
echo downloading IntelliJ IDEA CE $VERSION
DOWNLOAD_FILE=ideaIC-$VERSION.win.zip
if test -f "$DOWNLOAD_DIR/$DOWNLOAD_FILE"; then
echo "download already exists. copying $DOWNLOAD_DIR/$DOWNLOAD_FILE"
cp $DOWNLOAD_DIR/$DOWNLOAD_FILE $DOWNLOAD_FILE
else
mkdir $DOWNLOAD_DIR
wget --progress=bar:force:noscroll https://download-cdn.jetbrains.com/idea/$DOWNLOAD_FILE
cp $DOWNLOAD_FILE $DOWNLOAD_DIR/$DOWNLOAD_FILE
fi
echo unzipping required files
unzip -o $DOWNLOAD_FILE "plugins/java/lib/*" -d ide
unzip -o $DOWNLOAD_FILE "plugins/java-ide-customization/lib/*" -d ide
echo repackaging ide
mkdir -p repackaged
zip -r $DEST_ZIP ide
unzip -o $DOWNLOAD_FILE "lib/3rd-party-rt.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/app.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/external-system-rt.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/forms_rt.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/groovy.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/jps-model.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/protobuf.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/rd.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/stats.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/util.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/util_rt.jar" -d ide
unzip -o $DOWNLOAD_FILE "lib/util-8.jar" -d ide
echo do the cleanup
rm $DOWNLOAD_FILE
cd ..