diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-07-16 15:04:47 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-07-29 12:36:25 +0200 |
commit | 02df8f3f9f16d67ba475829ed57b0d858b513031 (patch) | |
tree | 34ccccd9c7e61da347ae23f7bfc243d874fe2b14 /src/intellij/setup.sh | |
parent | ca6a1666a951ac98c633cb10b20a0a991dadf31b (diff) | |
download | scala-02df8f3f9f16d67ba475829ed57b0d858b513031.tar.gz scala-02df8f3f9f16d67ba475829ed57b0d858b513031.tar.bz2 scala-02df8f3f9f16d67ba475829ed57b0d858b513031.zip |
Scrubbing up the IntelliJ Config
- Add recently sprouted modules (xml and parser-combinators)
- Replace some of the documentation with a setup script
- Update Ant build to copy Maven sourced JARs to ./build/deps.
These are included in the IntelliJ classpath.
- Define the library for Ant at the project level based on
./lib, rather than asking the user to define global library.
- Disable Type Aware Highlighting by default.
IntelliJ now can build everything within the IDE with CTRL-F9.
Diffstat (limited to 'src/intellij/setup.sh')
-rwxr-xr-x | src/intellij/setup.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/intellij/setup.sh b/src/intellij/setup.sh new file mode 100755 index 0000000000..d0e1abeb96 --- /dev/null +++ b/src/intellij/setup.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +# +# Generates IntelliJ IDEA project files based on the checked-in samples. +# + +set -e +export SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +export BASE="$( cd "$( dirname "$0" )"/../.. && pwd )" +echo "About to delete .ipr and .iml files and replace with the .SAMPLE files. Press enter to continue or CTRL-C to cancel." +read + +(rm *.ipr *.iml 2>/dev/null) +for f in $(ls "$SCRIPT_DIR"/*.SAMPLE); do + NEW_FILE=`echo $f | perl -pe 's/.SAMPLE//'`; + + cp $f $NEW_FILE + + # IntelliJ doesn't process the "compilerOptions" setting for variable + # replacement. If it did, we would just use "$PROJECT_DIR$". Instead, + # we do this replacement ourselves. + perl -pi -e 's/\$BASE_DIR\$/$ENV{"BASE"}/g' $NEW_FILE + echo "Created $NEW_FILE" +done |