File tree Expand file tree Collapse file tree 1 file changed +13
-28
lines changed Expand file tree Collapse file tree 1 file changed +13
-28
lines changed Original file line number Diff line number Diff line change @@ -854,34 +854,19 @@ if [[ "${SKIP_RECONFIGURE}" ]]; then
854
854
RECONFIGURE=" "
855
855
fi
856
856
857
- # WORKSPACE, BUILD_DIR and INSTALLABLE_PACKAGE must be absolute paths
858
- case " ${WORKSPACE} " in
859
- /* ) ;;
860
- * )
861
- echo " workspace must be an absolute path (was '${WORKSPACE} ')"
862
- exit 1
863
- ;;
864
- esac
865
- case " ${BUILD_DIR} " in
866
- /* ) ;;
867
- " " )
868
- echo " the --build-dir option is required"
869
- usage
870
- exit 1
871
- ;;
872
- * )
873
- echo " build-dir must be an absolute path (was '${BUILD_DIR} ')"
874
- exit 1
875
- ;;
876
- esac
877
- case " ${INSTALLABLE_PACKAGE} " in
878
- /* ) ;;
879
- " " ) ;;
880
- * )
881
- echo " installable-package must be an absolute path (was '${INSTALLABLE_PACKAGE} ')"
882
- exit 1
883
- ;;
884
- esac
857
+ # WORKSPACE, BUILD_DIR, and INSTALLABLE_PACKAGE must be absolute paths
858
+ if ! [[ ${WORKSPACE} =~ ^/ ]] ; then
859
+ echo " workspace must be an absolute path (was '${WORKSPACE} ')"
860
+ exit 1
861
+ fi
862
+ if ! [[ ${BUILD_DIR} =~ ^/ ]] ; then
863
+ echo " build-dir must be an absolute path (was '${BUILD_DIR} ')"
864
+ exit 1
865
+ fi
866
+ if ! [[ ${INSTALLABLE_PACKAGE:-/ } =~ ^/ ]] ; then
867
+ echo " installable-package must be an absolute path (was '${INSTALLABLE_PACKAGE} ')"
868
+ exit 1
869
+ fi
885
870
886
871
# WORKSPACE must exist
887
872
if [ ! -e " ${WORKSPACE} " ] ; then
You can’t perform that action at this time.
0 commit comments