From e22e94cd9708406ef9a96c7ec4bb9216be630ec2 Mon Sep 17 00:00:00 2001 From: friendica Date: Wed, 7 May 2014 20:31:21 -0700 Subject: ok *now* shred works with alternate config files --- util/shred/shred | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'util') diff --git a/util/shred/shred b/util/shred/shred index 7a42a8d29..d6fa051c4 100755 --- a/util/shred/shred +++ b/util/shred/shred @@ -23,16 +23,6 @@ FCLI_RC="$HOME/.shred.rc" -# Source FriendicaOAuth.sh -OAuth_sh=$(which FriendicaOAuth.sh) -(( $? != 0 )) && echo 'Unable to locate FriendicaOAuth.sh! Make sure it is in searching PATH.' && exit 1 -source "$OAuth_sh" - -# Source JSON.sh -JSON_sh=$(which JSON.sh) -(( $? != 0 )) && echo 'Unable to locate JSON.sh! Make sure it is in searching PATH.' && exit 1 -source "$JSON_sh" - usage () { echo "usage: $0 options @@ -122,6 +112,18 @@ load_config () { # Source Config [[ -f "$FCLI_RC" ]] && . "$FCLI_RC" || show_config_help 1 + + # Source FriendicaOAuth.sh + OAuth_sh=$(which FriendicaOAuth.sh) + (( $? != 0 )) && echo 'Unable to locate FriendicaOAuth.sh! Make sure it is in searching PATH.' && exit 1 + source "$OAuth_sh" + + # Source JSON.sh + JSON_sh=$(which JSON.sh) + (( $? != 0 )) && echo 'Unable to locate JSON.sh! Make sure it is in searching PATH.' && exit 1 + source "$JSON_sh" + + [[ "$oauth_consumer_key" == "" ]] && show_config_help 1 [[ "$oauth_consumer_secret" == "" ]] && show_config_help 1 -- cgit v1.2.3