diff options
author | ars <asav1410@gmail.com> | 2020-10-21 22:46:20 +0100 |
---|---|---|
committer | ars <asav1410@gmail.com> | 2020-10-21 22:46:20 +0100 |
commit | b10d2b229c37451b8c7462da01521290183b8325 (patch) | |
tree | bb5df37c65389b36a162c518e990612625b983aa /oedquery.sh | |
parent | 53e646a1fd27735ada7ce1f0d23bf5cf1009ee50 (diff) |
Make config reading much simpler (far too overengineered before).
Diffstat (limited to 'oedquery.sh')
-rwxr-xr-x | oedquery.sh | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/oedquery.sh b/oedquery.sh index a255839..239d2cf 100755 --- a/oedquery.sh +++ b/oedquery.sh @@ -12,15 +12,7 @@ config=( # curl options OPTS='--silent -L -H "app_id: $appId" -H "app_key: $appKey"' -while read line -do - # If config file variable doesn't match variable in config array then ignore it. - if [[ " ${config[@]} " =~ " $(echo "$line" | cut -d '=' -f 1) " ]] - then - # Declare variables - eval $(echo "$line" | cut -d '=' -f 1)=$(echo "$line" | cut -d '=' -f 2-) -fi -done < oedquery.conf +source oedquery.conf # function to provide data to a for loop _jq() { |