Commit Graph

20 Commits (master)

Author SHA1 Message Date
Didier BONNEFOI e4aad34a4c fix: remove useless variable in updateTime() 2018-08-26 13:17:25 +02:00
Didier BONNEFOI 920bc41873 Bash coding style review
- functions: use lower case local variables
- set some configuration variables as constant
- review some variables naming
- test command: use built-in [[ instead of [
- always keep if+then in the same line
- change shebang for portability

Enhancements
- API headers: use OVH API's timestamp instead of user's one to bypass misconfigured host.
- simplify valid target check
- use API_URL when target is set
- help output rework
- refresh README
2018-08-26 13:08:27 +02:00
antoine.leveugle 43814562f5 feat: add US target support
closes #14
2018-08-01 16:23:21 +02:00
Didier BONNEFOI fd6006cd14 shellcheck pass + code review:
- more readable long curl commands (multiple lines)
- add helpers to manage string's upper/lower case
- add helper to join array items
- fix functions's variables scope
2018-06-21 15:04:32 +02:00
Didier BONNEFOI c0eb83d771 fix default profile move to new location 2018-02-26 14:23:00 +01:00
Didier BONNEFOI 3cb29bc968 Automaticly move profiles from legacy path to user's home, and notify about it 2018-02-26 14:18:18 +01:00
Didier BONNEFOI b532476260 move profiles to user home 2018-02-20 17:12:34 +01:00
Didier BONNEFOI e47fb83ca0 fix BASE_PATH, resolving real path the script, to allow symlink this one 2018-02-20 12:15:36 +01:00
Didier BONNEFOI 15f11e880f Add access.rules file into profile
- this feature avoid to write very long post data content when initiating consumer key
2018-02-12 18:07:45 +01:00
Didier BONNEFOI 71c1d5fe6f profiles management enhancements
- when launching --init/--initApp, create the defined profile if missing
- fix profiles listing (bad directory)
- help command : always add --profile argument if profile name is defined
2017-06-21 14:31:13 +02:00
Didier BONNEFOI 143ad5114b Allow to set --profile option at any position :
- functions to create keys now launched out of parseArguments()

bugfix :
- fix empty CURRENT_PATH when launching --init/--initApp

enhancements :
- better output for --list-profile output + add 'default' profile

refactoring :
- move initApplication() into createConsumerKey() instead of calling it each time
2017-06-21 00:21:47 +02:00
Didier BONNEFOI 485cbd833e if --profile is set to 'default', load configuration from script directory 2017-06-19 18:36:33 +02:00
Didier BONNEFOI 1a0e3f220f Allow multiple API keys management with profiles
- add --profile to override default configuration location
- add --list-profile to display available profiles
- rework messages to display command with the current profile if set

Bugfix
- ensure OVH App Key an App Secret are defined when creating consumer key

Enhancements
- when using --init, allow override default "all permissions grants" if --data is set
- add -h/--help
2017-06-13 18:06:41 +02:00
antoine.leveugle 5719c46b2d feat: make the execution path relative 2016-06-09 20:53:21 +02:00
antoine.leveugle fe3697eaaa fix: assure compatibility with bash 4.0 and 4.1
closes #2
2016-05-25 21:45:28 +02:00
antoine.leveugle c3d7245a3b some little improvments 2014-04-29 00:25:57 +02:00
antoine.leveugle fcf5e6f588 add targets support for EU and CA apis 2014-04-28 23:14:33 +02:00
antoine.leveugle 1eb3c11c18 add check during initialization and information to create a consumer key later 2014-04-28 12:19:11 +02:00
antoine.leveugle c3c5130f5d add http response status in out, at the begining of the line 2014-04-27 15:12:56 +02:00
antoine.leveugle 2f60538889 move script 2014-04-19 21:48:07 +02:00