s4-devel: a useful script to setup bin/ and st/ as tmpfs filesystems
authorAndrew Tridgell <tridge@samba.org>
Wed, 6 Jan 2010 23:18:30 +0000 (10:18 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 8 Jan 2010 02:03:03 +0000 (13:03 +1100)
this makes building and testing s4 as a developer much faster, if you
have enough memory!

source4/scripting/devel/tmpfs.sh [new file with mode: 0755]

diff --git a/source4/scripting/devel/tmpfs.sh b/source4/scripting/devel/tmpfs.sh
new file mode 100755 (executable)
index 0000000..5604f68
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# This sets up bin/ and st/ as tmpfs filesystems, which saves a lot of
+# time waiting on the disk!
+
+rm -rf bin st
+mkdir -p bin st || exit 1
+sudo mount -t tmpfs /dev/null bin || exit 1
+sudo chown $USER bin || exit 1
+echo "tmpfs setup for bin/"
+sudo mount -t tmpfs /dev/null st || exit 1
+sudo chown $USER st || exit 1
+echo "tmpfs setup for st/"