ambevar-dotfiles/.scripts/encfsw

19 lines
372 B
Plaintext
Raw Normal View History

2013-07-06 20:06:35 +02:00
#!/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
2013-07-07 15:41:30 +02:00
MOUNTPOINT="$2"
[ $# -ne 2 ]; MOUNTPOINT="${1}_dc"
encfs "$(realpath "$1")" "$(realpath "$MOUNTPOINT")"