Skip to content

Commit

Permalink
20-files-present-and-referenced: fail early on unknown storage api ve…
Browse files Browse the repository at this point in the history
…rsion
  • Loading branch information
DimStar77 committed Aug 23, 2024
1 parent f8dcc1b commit 89c7a0f
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions 20-files-present-and-referenced
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@ HELPERS_DIR="$BASE_DIR/helpers"
$HELPERS_DIR/check_input_filename "$DIR_TO_CHECK" || exit 1
. $HELPERS_DIR/functions
test -z "$DESTINATIONDIR" -a -d "$DIR_TO_CHECK/.osc" && {
[ "$(<.osc/_osclib_version)" = "1.0" ] && \
DESTINATIONDIR="$DIR_TO_CHECK/.osc" || \
DESTINATIONDIR="$DIR_TO_CHECK/.osc/sources"
OSCLIBVER="$(<.osc/_osclib_version)"
case "$OSCLIBVER" in
1.0)
DESTINATIONDIR="$DIR_TO_CHECK/.osc"
;;
2.0)
DESTINATIONDIR="$DIR_TO_CHECK/.osc/sources"
;;
*)
echo "osclib version $OSCLIBVER not yet supported by source_validator" && exit 2
;;
esac
OSC_MODE="true"
}

Expand Down

0 comments on commit 89c7a0f

Please sign in to comment.