-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check that osc-api.json seems valide
Signed-off-by: Matthias Gatto <[email protected]>
- Loading branch information
1 parent
5d398bf
commit 4abadb2
Showing
3 changed files
with
19 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
# check if $1 is valide, if $2 is present, remove invalide file | ||
|
||
test=$(json-search -sn Request $1 | json-search -n properties) | ||
test_ret=$? | ||
|
||
if [ "$test_ret" == "1" -o "$test" == "null" ]; then | ||
echo "$1 is invalide" >&2 | ||
if [ "$#" -gt 1 ]; then | ||
rm $1 | ||
fi | ||
fi | ||
|
||
|
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