summaryrefslogtreecommitdiff
path: root/src/intellij/setup.sh
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2014-05-02 10:21:56 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2014-05-02 11:11:27 +0200
commitf93fbef8ecbcf1f09cd18632bd209dbf641f7c96 (patch)
tree5799a80df7b4f3e0d99663801f5dd320bc3cc5d5 /src/intellij/setup.sh
parentaa3a3dd6a420f57b0fe815bfcb2b23fbb4284468 (diff)
downloadscala-f93fbef8ecbcf1f09cd18632bd209dbf641f7c96.tar.gz
scala-f93fbef8ecbcf1f09cd18632bd209dbf641f7c96.tar.bz2
scala-f93fbef8ecbcf1f09cd18632bd209dbf641f7c96.zip
IntelliJ project files
Fixes compilation within IDEA. Allows compiling and running JUnit tests directly withing the IDE.
Diffstat (limited to 'src/intellij/setup.sh')
-rwxr-xr-xsrc/intellij/setup.sh15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/intellij/setup.sh b/src/intellij/setup.sh
index bd324ba5bd..ec303778ed 100755
--- a/src/intellij/setup.sh
+++ b/src/intellij/setup.sh
@@ -5,19 +5,10 @@
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 -f *.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"
+for f in "$SCRIPT_DIR"/*.SAMPLE; do
+ g=${f%.SAMPLE}
+ cp $f $g
done