Skip to content

Commit ab775d1

Browse files
committed
Merge remote-tracking branch 'origin/master' into master-rebranch
2 parents bbaa027 + 4e59d39 commit ab775d1

File tree

1 file changed

+13
-28
lines changed

1 file changed

+13
-28
lines changed

utils/build-script-impl

Lines changed: 13 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -856,34 +856,19 @@ if [[ "${SKIP_RECONFIGURE}" ]]; then
856856
RECONFIGURE=""
857857
fi
858858

859-
# WORKSPACE, BUILD_DIR and INSTALLABLE_PACKAGE must be absolute paths
860-
case "${WORKSPACE}" in
861-
/*) ;;
862-
*)
863-
echo "workspace must be an absolute path (was '${WORKSPACE}')"
864-
exit 1
865-
;;
866-
esac
867-
case "${BUILD_DIR}" in
868-
/*) ;;
869-
"")
870-
echo "the --build-dir option is required"
871-
usage
872-
exit 1
873-
;;
874-
*)
875-
echo "build-dir must be an absolute path (was '${BUILD_DIR}')"
876-
exit 1
877-
;;
878-
esac
879-
case "${INSTALLABLE_PACKAGE}" in
880-
/*) ;;
881-
"") ;;
882-
*)
883-
echo "installable-package must be an absolute path (was '${INSTALLABLE_PACKAGE}')"
884-
exit 1
885-
;;
886-
esac
859+
# WORKSPACE, BUILD_DIR, and INSTALLABLE_PACKAGE must be absolute paths
860+
if ! [[ ${WORKSPACE} =~ ^/ ]] ; then
861+
echo "workspace must be an absolute path (was '${WORKSPACE}')"
862+
exit 1
863+
fi
864+
if ! [[ ${BUILD_DIR} =~ ^/ ]] ; then
865+
echo "build-dir must be an absolute path (was '${BUILD_DIR}')"
866+
exit 1
867+
fi
868+
if ! [[ ${INSTALLABLE_PACKAGE:-/} =~ ^/ ]] ; then
869+
echo "installable-package must be an absolute path (was '${INSTALLABLE_PACKAGE}')"
870+
exit 1
871+
fi
887872

888873
# WORKSPACE must exist
889874
if [ ! -e "${WORKSPACE}" ] ; then

0 commit comments

Comments
 (0)