Signed-off-by: Aoi K <koizumi.aoi@kyoko-project.wer.ee>

git-svn-id: file:///srv/svn/repo/kanako/trunk@8 62e5d677-aa6e-8c4a-b8cb-b9416171cb8e
This commit is contained in:
koizumi.aoi 2022-10-13 11:00:16 +00:00
parent c037b22277
commit e296b48219
2 changed files with 5 additions and 5 deletions

8
kanako
View File

@ -25,9 +25,9 @@ fn_copy() {
fn_view $1 | "${clip_cmd}"
}
fn_edit() {
"${decrypt_cmd}" "${decrypt_args}" "${1%%.enc}.enc" > "${1%%.enc}"
${encrypt_cmd} ${decrypt_args} ${1%%.enc}.enc > ${1%%.enc}
"${EDITOR}" "${1%%.enc}"
"${encrypt_cmd}" "${encrypt_args}" "${1%%.enc}" > "${1%%.enc}".enc
${encrypt_cmd} ${encrypt_args} ${1%%.enc} > ${1%%.enc}.enc
rm "${1%%.enc}"
}
fn_generate() {
@ -43,7 +43,7 @@ fn_new() {
"${EDITOR}" "${tmpfile}"
mkdir -p "$(dirname "$1")"
"${encrypt_cmd}" "${encrypt_args}" "${tmpfile}" > "${1%%.enc}".enc
${encrypt_cmd} ${encrypt_args} ${tmpfile} > ${1%%.enc}.enc
rm ${tmpfile}
}
fn_trash_directory() {
@ -75,7 +75,7 @@ case $1 in
-g | gen) fn_generate $2 ;;
-l | list) fn_list ;;
-n | add) fn_new $2 ;;
-r | trash) fn_trash $2 ;;
-r | trash) fn_trash_entry $2 ;;
-R | trashd) fn_trash_directory $2 ;;
-v | view) fn_view $2 ;;
*) fn_usage ;;

View File

@ -6,7 +6,7 @@
# [Encryption]
## age
#encrypt_cmd="age"
#encrypt_args="-e -R ${key_dir}/pub.age"
#encrypt_args="-e -R ${key_dir}/pub.age --armor"
#decrypt_args="-d -i ${key_dir}/priv.age"
## gpg