Fixed bug with upload
This commit is contained in:
@@ -36,12 +36,12 @@ die() { echo "${RED}FAIL${RST} $*" >&2; exit 1; }
|
||||
# Searches the whole file; for sectioned keys, grep is specific enough
|
||||
# given our small, flat schema.
|
||||
toml_get() {
|
||||
grep "^$1 " "$CONFIG" | head -1 | sed 's/.*= *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | tr -d ' '
|
||||
(grep "^$1 " "$CONFIG" 2>/dev/null || true) | head -1 | sed 's/.*= *"\{0,1\}\([^"]*\)"\{0,1\}/\1/' | tr -d ' '
|
||||
}
|
||||
|
||||
# Extract a TOML array as space-separated values: toml_array "key"
|
||||
toml_array() {
|
||||
grep "^$1 " "$CONFIG" | head -1 \
|
||||
(grep "^$1 " "$CONFIG" 2>/dev/null || true) | head -1 \
|
||||
| sed 's/.*\[//; s/\].*//; s/"//g; s/,/ /g' | tr -s ' '
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user