Created
October 16, 2013 02:21
-
-
Save m2ym/7001676 to your computer and use it in GitHub Desktop.
Maven Ramdisk
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/sh | |
set -ex | |
DIR="$HOME/var/tmp" | |
SIZE=1024m | |
mkdir -p "$DIR" | |
sudo umount "$DIR" | |
sudo mount -t tmpfs -o size=$SIZE tmpfs "$DIR" | |
find . -type f -name pom.xml | while read file; do | |
dir="$(dirname $file)" | |
target="$DIR/$dir/target" | |
link="$dir/target" | |
mkdir -p "$target" | |
rm -rf "$link" | |
ln -s "$target" "$link" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment