Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 22 lines (19 sloc) 413 Bytes
#!/bin/bash
if [[ $1 == 'lock' ]]; then
echo 'locking...'
crypt en ~/docs/vault > /dev/null
RESULT=$?
if [ $RESULT -eq 0 ]; then
echo 'locked.'
fi
elif [[ $1 == 'unlock' ]]; then
echo 'unlocking...'
crypt de ~/docs/vault > /dev/null
RESULT=$?
if [ $RESULT -eq 0 ]; then
echo 'unlocked.'
fi
else
echo "Please specify 'lock' or 'unlock'."
exit 0
fi