From 81d7fdfec1cf0f81be0649f12429923dd7d6d3f7 Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 3 Mar 2024 13:20:02 +0100 Subject: [PATCH] crypt.sh: add delete and create file func --- crypt.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/crypt.sh b/crypt.sh index 75deba5..852519b 100755 --- a/crypt.sh +++ b/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