18 lines
340 B
Bash
18 lines
340 B
Bash
#!/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
|
|
|
|
[ $# -ne 2 ] && 2="${1}_dc"
|
|
encfs "$(realpath "$1")" "$(realpath "$2")"
|