Skip to content

Instantly share code, notes, and snippets.

@mohemohe
Last active June 21, 2020 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mohemohe/2960b37209a00609b9b5c6b2fdc2706f to your computer and use it in GitHub Desktop.
Save mohemohe/2960b37209a00609b9b5c6b2fdc2706f to your computer and use it in GitHub Desktop.
LinuxのJetbrains系らくらくPleiadesインストーラー
#!/bin/bash
set -xe;
TMP_DIR='/tmp/pleiades'
TARGET_DIR='/opt/src/pleiades'
APP_DIR="${HOME}/.local/share/JetBrains/Toolbox/apps"
rm -rf "${TMP_DIR}"
mkdir -p "${TMP_DIR}"
cd "${TMP_DIR}"
wget http://ftp.jaist.ac.jp/pub/mergedoc/pleiades/build/stable/pleiades.zip
unzip pleiades.zip
rm -f pleiades.zip
VERSION="$(ls pleiades-*)"
rm -rf "${TARGET_DIR}/${VERSION}"
mkdir -p "${TARGET_DIR}/${VERSION}"
cd "${TARGET_DIR}/${VERSION}"
APPS="$(ls "${APP_DIR}")"
for target in $APPS; do {
cp -rf "${TMP_DIR}" "${target}"
} done
VMOPTIONS="$(find "${APP_DIR}" -name '*.vmoptions')"
for target in $VMOPTIONS; do {
sed -i "/pleiades.jar\$/d" "${target}"
module="$(echo "${target}" | sed -e "s|${APP_DIR}/||g" | cut -d'/' -f1)"
pleiades_path="$(find "${TARGET_DIR}/${VERSION}/${module}" -name 'pleiades.jar')"
sed -i -e "$ a -javaagent:${pleiades_path}" "${target}"
sed -i -e "$ a -Xverify:none" "${target}"
} done
@mohemohe
Copy link
Author

※ ArchLinuxで動作確認

@mohemohe
Copy link
Author

Ubuntu 20.04でも動作確認
つーかJetbrains Toolboxで入れてればLinux系なら何でも動くと思う

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment