-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jovian-stubs: Use proper quoting for jovian log spew
Also make the output a bit more readable by keeping the basename of the called stub. (cherry picked from commit c83be91)
- Loading branch information
Showing
2 changed files
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
#!/usr/bin/env bash | ||
>&2 echo "[JOVIAN] $0: stub called with: $*" | ||
>&2 printf "[JOVIAN] %s: stub called with: %s\n" "${0##*/}" "$(printf "%q " "$@")" | ||
|
||
if [ "$*" == "-t 11" ]; then | ||
>&2 echo "[JOVIAN] $0: replying with cached data" | ||
>&2 echo "[JOVIAN] ${0##*/}: replying with cached data" | ||
cat /run/jovian/dmidecode-11.txt | ||
exit 0 | ||
fi | ||
|
||
>&2 echo "[JOVIAN] $0: don't know how to handle $*" | ||
>&2 printf "[JOVIAN] %s: don't know how to handle: %s\n" "${0##*/}" "$(printf "%q " "$@")" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters