mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 00:40:44 +02:00
Add repl plug in vim, update zsh, starship
This commit is contained in:
parent
04331d3e94
commit
5cf28d635b
5 changed files with 31 additions and 28 deletions
20
bin/gpe
20
bin/gpe
|
|
@ -1,18 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
# For working this script set in $GPG_KEY you gpg key
|
||||
# For working this script set $GPG_KEY with gpg key
|
||||
|
||||
## Functions
|
||||
function encrypt() {
|
||||
encrypt() {
|
||||
gpg -ea -r $GPG_KEY $@
|
||||
}
|
||||
function decrypt() {
|
||||
local fn="$1"
|
||||
if [ ${fn: -4} == ".asc" ]
|
||||
then gpg -d -o ${fn%%.asc} $@
|
||||
elif [ ${fn: -4} == ".gpg" ]
|
||||
then gpg -d -o ${fn%%.gpg} $@
|
||||
fi
|
||||
decrypt() {
|
||||
local f="$1"
|
||||
if [ ${f: -4} == ".asc" ]
|
||||
then gpg -d -o ${f%%.asc} $@
|
||||
elif [ ${f: -4} == ".gpg" ]
|
||||
then gpg -d -o ${f%%.gpg} $@
|
||||
fi
|
||||
}
|
||||
|
||||
## Case's
|
||||
case "$1" in
|
||||
enc|e) shift; encrypt $@ ;;
|
||||
dec|d) shift; decrypt $@ ;;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue