diff options
| -rw-r--r-- | .vim/spell/fr.utf-8.add | 1 | ||||
| -rwxr-xr-x | bin/encsh | 20 |
2 files changed, 21 insertions, 0 deletions
diff --git a/.vim/spell/fr.utf-8.add b/.vim/spell/fr.utf-8.add index 8bd6403..3440438 100644 --- a/.vim/spell/fr.utf-8.add +++ b/.vim/spell/fr.utf-8.add @@ -1 +1,2 @@ Flo +Adélie/! diff --git a/bin/encsh b/bin/encsh new file mode 100755 index 0000000..9888e0f --- /dev/null +++ b/bin/encsh @@ -0,0 +1,20 @@ +#!/bin/sh + +[ "$1" ] && { + echo 'encsh creates a password protected encrypted shell script. +Usage: encsh <script >script-enc + chmod +x script-enc + script-enc [--show|args...]' + exit +} + +echo '#!/bin/sh +s=$(openssl aes-256-cbc -a -d -salt -pbkdf2 << \EOT' + +openssl aes-256-cbc -a -salt -pbkdf2 + +echo 'EOT +) +[ "$1" == --show ] && echo "$s" && exit +eval "$s $@" +' |
