forked from excelle08/fuse-cpp-ramfs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_verifs2.sh
executable file
·53 lines (43 loc) · 1.35 KB
/
setup_verifs2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/bin/bash
#
# This file is part of RefFS.
#
# Copyright (c) 2020-2024 Yifei Liu
# Copyright (c) 2020-2024 Wei Su
# Copyright (c) 2020-2024 Erez Zadok
# Copyright (c) 2020-2024 Stony Brook University
# Copyright (c) 2020-2024 The Research Foundation of SUNY
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# RefFS is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
fsname="verifs2"
BUILD_DIR="build"
MOUNT_POINT="/mnt/test-$fsname"
if [ -d ./$BUILD_DIR ]; then
rm -r ./$BUILD_DIR
fi
mkdir -p ./$BUILD_DIR
cd ./$BUILD_DIR
cmake ../src
make
sudo make install
if [ "$(mount | grep $MOUNT_POINT)" ]; then
sudo umount -f $MOUNT_POINT;
fi
if [ -d $MOUNT_POINT ]; then
sudo rm -rf $MOUNT_POINT;
fi
sudo mkdir -p $MOUNT_POINT
# Ensure that MOUNT_POINT is an empty dir
sudo mount -t fuse.fuse-cpp-ramfs $fsname $MOUNT_POINT