summarylogtreecommitdiffstats
path: root/mutantfactions
blob: 0221acca59c26007f26bdb6bf244c48998a843ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/sh

cleanup()
{
  fusermount -u $HOME/.mutantfactions/overlay
}

if [[ ! -d $HOME/.mutantfactions/overlay ]]; then
  mkdir -p $HOME/.mutantfactions/overlay
fi
if [[ ! -d $HOME/.mutantfactions/data ]]; then
  mkdir -p $HOME/.mutantfactions/data
fi

unionfs -o cow $HOME/.mutantfactions/data=RW:/opt/mutantfactions=RO $HOME/.mutantfactions/overlay
trap cleanup SIGTERM
trap cleanup SIGKILL
trap cleanup SIGINT
$HOME/.mutantfactions/overlay/MutantFactions $@
cleanup