18 lines
340 B
Plaintext
18 lines
340 B
Plaintext
|
#!/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")"
|