19 lines
372 B
Bash
Executable File
19 lines
372 B
Bash
Executable File
#!/bin/sh
|
|
if [ $# -ne 1 ] && [ $# -ne 2 ]; then
|
|
echo "Usage: $0 ROOTDIR [MOUNTPOINT]"
|
|
exit
|
|
fi
|
|
|
|
if [ -w "$(command -v realpath)" ]; then
|
|
echo "You need 'realpath'."
|
|
exit
|
|
fi
|
|
if [ -w "$(command -v encfs)" ]; then
|
|
echo "You need 'encfs'."
|
|
exit
|
|
fi
|
|
|
|
MOUNTPOINT="$2"
|
|
[ $# -ne 2 ]; MOUNTPOINT="${1}_dc"
|
|
encfs "$(realpath "$1")" "$(realpath "$MOUNTPOINT")"
|