ambevar-dotfiles/.scripts/encfsw

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