crypt.sh: add delete and create file func
This commit is contained in:
parent
24885efdb4
commit
81d7fdfec1
16
crypt.sh
16
crypt.sh
|
@ -21,6 +21,10 @@ create_decrypt () {
|
|||
git add --intent-to-add decrypted
|
||||
git update-index --assume-unchanged decrypted
|
||||
}
|
||||
delete_decrypt () {
|
||||
rm decrypted
|
||||
git rm decrypted
|
||||
}
|
||||
|
||||
|
||||
if [ $# = 1 ]; then
|
||||
|
@ -32,11 +36,21 @@ if [ $# = 1 ]; then
|
|||
fi
|
||||
|
||||
if [ $1 = "lock" ]; then
|
||||
rm decrypted
|
||||
delete_decrypt
|
||||
git-crypt lock
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "create_decrypt" ]; then
|
||||
create_decrypt
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ $1 = "delete_decrypt" ]; then
|
||||
delete_decrypt
|
||||
exit
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ $# = 2 ] && [ $1 = "unlock" ]; then
|
||||
|
|
Loading…
Reference in New Issue