better checking and portability in read-dependencies and read-version
This commit is contained in:
parent
843d099752
commit
949fb98df7
@ -26,6 +26,7 @@ if [ ! -e "$REQUIRES" ]; then
|
||||
fi
|
||||
|
||||
# Filter out comments and empty lines
|
||||
DEPS=$(sed -n -e 's,#.*,,' -e '/./p' "$REQUIRES") ||
|
||||
DEPS=$(sed -n -e 's,#.*,,' -e '/./p' "$REQUIRES") &&
|
||||
[ -n "$DEPS" ] ||
|
||||
fail "failed to read deps from '${REQUIRES}'"
|
||||
echo "$DEPS" | sort -d -f
|
||||
|
@ -25,7 +25,8 @@ if [ ! -e "$CHNG_LOG" ]; then
|
||||
fail "Unable to find 'ChangeLog' file located at '$CHNG_LOG'"
|
||||
fi
|
||||
|
||||
VERSION=$(sed -n '/^[0-9]\+[.][0-9]\+[.][0-9]\+:/ {s/://; p; :a;n; ba}' \
|
||||
"$CHNG_LOG") ||
|
||||
VERSION=$(sed -n '/^[0-9]\+[.][0-9]\+[.][0-9]\+:/ \
|
||||
{s/://; p; :a;n; ba; }' "$CHNG_LOG") &&
|
||||
[ -n "$VERSION" ] ||
|
||||
fail "failed to get version from '$CHNG_LOG'"
|
||||
echo "$VERSION"
|
||||
|
Loading…
x
Reference in New Issue
Block a user