Skip to content

Instantly share code, notes, and snippets.

@m2ym
Created October 16, 2013 02:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m2ym/7001676 to your computer and use it in GitHub Desktop.
Save m2ym/7001676 to your computer and use it in GitHub Desktop.
Maven Ramdisk
#!/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