Skip to content

Commit

Permalink
Merge pull request #12 from BrendanThompson/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
BrendanThompson committed Apr 11, 2014
2 parents 4a905e4 + ea427aa commit 8ea9358
Showing 1 changed file with 17 additions and 4 deletions.
21 changes: 17 additions & 4 deletions keycrypt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
################################# Global Variables #################################
##########################################################################################

VERSION="0.1.0"
TMP_PASS="bubbl3s"
VERSION="0.1.1"
TMP_PASS=""
GKEY=""
OLD_KEY=""

Expand Down Expand Up @@ -239,6 +239,16 @@ function askCopyPubKey() {
esac
}

function checkApplicationInstalled() {
local APP=$1

command -v $APP >/dev/null 2>&1 || { echo >&2 "I require $APP but it's not installed. Aborting."; exit 1; }
}

function generatePassword() {
TMP_PASS=$(openssl rand -base64 128)
}

function usage() {
cat <<EOF
Usage
Expand All @@ -263,13 +273,16 @@ EOF
################################## Entry Point ##################################
##########################################################################################

checkApplicationInstalled "openssl"
generatePassword


case $1 in
"hello" )
echo "Hello, $2"
;;
[tT][eE][sS][tT] ) #test
defaultKeyLocation $2
echo "$GKEY"
checkApplicationInstalled "foo"
;;
[cC][rR][eE][aA][tT][eE] | [cC][rR] ) #create
defaultKeyLocation $2
Expand Down

0 comments on commit 8ea9358

Please sign in to comment.