diff options
Diffstat (limited to 'src/intellij/setup.sh')
-rwxr-xr-x | src/intellij/setup.sh | 15 |
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 |