Skip to content
This repository has been archived by the owner on Apr 29, 2022. It is now read-only.

Commit

Permalink
Fix "expires_in" field recognition
Browse files Browse the repository at this point in the history
  • Loading branch information
winmain committed Apr 20, 2016
1 parent e5678f5 commit dc8eaa6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imgur-screenshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ function save_access_token() {

access_token="$(egrep -o 'access_token":".*"' <<<"${1}" | cut -d '"' -f 3)"
refresh_token="$(egrep -o 'refresh_token":".*"' <<<"${1}" | cut -d '"' -f 3)"
expires_in="$(egrep -o 'expires_in":".*"' <<<"${1}" | cut -d '"' -f 3)"
expires_in="$(egrep -o 'expires_in":[0-9]*' <<<"${1}" | cut -d ':' -f 2)"
token_expire_time="$(( $(date +%s) + expires_in ))"

# create dir if not exist
Expand Down

2 comments on commit dc8eaa6

@Gabscap
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

current_version is still on 1.7.1, whereas this commit is tagged with 1.7.2

@jomo
Copy link
Owner

@jomo jomo commented on dc8eaa6 Apr 24, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, see #71.

Please sign in to comment.