summaryrefslogtreecommitdiff
path: root/resteasy/libexec/resteasy-mount
blob: 05bbb2acb11aa58629dedc63574877656e659a2c (plain) (blame)
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
#!/bin/bash
USAGE="[ro]"

# shellcheck source=resteasy-helper.sh
source "$(resteasy --exec-path)/resteasy-helper.sh"

set -o errexit
set -o nounset

flags=
if [[ "$#" -ge 1 ]]; then
    case "$1" in
        ro)
            shift
            flags+=--read-only
            ;;
        *)
            die_with_usage "unknown option: $1"
            ;;
    esac
fi

uuid=$(resteasy find-uuid)
mkdir -p "$RESTEASY_MOUNT_POINT"
mount $flags "/dev/disk/by-partuuid/$uuid" "$RESTEASY_MOUNT_POINT"

echo "$RESTEASY_MOUNT_POINT"