Last active
June 21, 2020 08:18
-
-
Save mohemohe/2960b37209a00609b9b5c6b2fdc2706f to your computer and use it in GitHub Desktop.
LinuxのJetbrains系らくらくPleiadesインストーラー
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
Ubuntu 20.04でも動作確認
つーかJetbrains Toolboxで入れてればLinux系なら何でも動くと思う
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
※ ArchLinuxで動作確認