summaryrefslogtreecommitdiffstats
path: root/source4/scripting/devel/tmpfs.sh
blob: e4798ecf6e7c3ad6a42e4cdf51de029de850175e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

# This sets up bin/ and st/ as tmpfs filesystems, which saves a lot of
# time waiting on the disk!

sudo echo "About to (re)mount bin and st as tmpfs"
rm -rf bin st
sudo umount bin >/dev/null 2>&1
sudo umount st >/dev/null 2>&1
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/"