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 @@ -856,34 +856,19 @@ if [[ "${SKIP_RECONFIGURE}" ]]; then
856
856
RECONFIGURE=" "
857
857
fi
858
858
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
887
872
888
873
# WORKSPACE must exist
889
874
if [ ! -e " ${WORKSPACE} " ] ; then
You can’t perform that action at this time.
0 commit comments