From 339a5d4d9cf54519cad92d5c74da9eb3e0ea864a Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 18 Dec 2021 08:52:10 +0200 Subject: Changes - exit codes - gpg2 to gpg - break to exit --- bin/news | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'bin/news') diff --git a/bin/news b/bin/news index 910f1cb..bd0bc95 100755 --- a/bin/news +++ b/bin/news @@ -46,6 +46,7 @@ title(){ import(){ echo "#TODO" echo $1 + exit 224 } add(){ if [ -f $1 ]; then @@ -55,7 +56,7 @@ add(){ TITLE=$(head -n 1 $FILE) FILE_IPFS_HASH=$(ipfs add -q $FILE) FILE_SIGN_FILE=$FILE".asc" - gpg2 --detach-sign --sign-with $FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE + gpg --detach-sign --sign-with $FINGERPRINT --armor --output $FILE_SIGN_FILE $FILE FILE_SIGNATURE=$(ipfs add -q $FILE_SIGN_FILE) cat > data < #TODO" echo "add Creates a data file from the news file you point to" echo "create Vim is going to pop up, you will write and save your" - echo " newsletter and it's going to be saved" + echo " newsletter and it's going to be saved" + exit 0 } title if [ ! -z $1 ]; then case $1 in - help) usage;exit;; - index) index;break;; - import) import $2; break;; - add) add $2; break;; + help) usage; exit;; + index) index; exit;; + import) import $2; exit;; + add) add $2; exit;; create) create; exit;; * ) usage;; esac -- cgit v1.2.3