Fix Package.sh script
This commit is contained in:
parent
1d6fa23770
commit
ad13db4157
|
@ -276,55 +276,55 @@ for PACKAGE_NAME in "${PACKAGES[@]}" ; do if [[ ${PACKAGE_NAME} != "Carla" ]] ;
|
|||
|
||||
popd >/dev/null
|
||||
|
||||
if ${DO_TARBALL} ; then
|
||||
pushd "${BUILD_FOLDER}" > /dev/null
|
||||
|
||||
pushd "${BUILD_FOLDER}" > /dev/null
|
||||
SUBST_PATH="${BUILD_FOLDER}/CarlaUE4"
|
||||
SUBST_FILE="${PACKAGE_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
|
||||
|
||||
SUBST_PATH="${BUILD_FOLDER}/CarlaUE4"
|
||||
SUBST_FILE="${PACKAGE_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
|
||||
# Copy the package config file to package
|
||||
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${PACKAGE_FILE}" "$_"
|
||||
|
||||
# Copy the package config file to package
|
||||
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${PACKAGE_FILE}" "$_"
|
||||
# Copy the OpenDRIVE .xodr files to package
|
||||
IFS='+' # set delimiter
|
||||
# MAPS_TO_COOK is read into an array as tokens separated by IFS
|
||||
read -ra ADDR <<< "$MAPS_TO_COOK"
|
||||
for i in "${ADDR[@]}"; do # access each element of array
|
||||
|
||||
# Copy the OpenDRIVE .xodr files to package
|
||||
IFS='+' # space is set as delimiter
|
||||
# MAPS_TO_COOK is read into an array as tokens separated by IFS
|
||||
read -ra ADDR <<< "$MAPS_TO_COOK"
|
||||
for i in "${ADDR[@]}"; do # access each element of array
|
||||
XODR_FILE_PATH="${CARLAUE4_ROOT_FOLDER}/Content${i:5}"
|
||||
MAP_NAME=${XODR_FILE_PATH##*/}
|
||||
XODR_FILE=$(find "${CARLAUE4_ROOT_FOLDER}/Content" -name "${MAP_NAME}.xodr" -print -quit)
|
||||
|
||||
XODR_FILE_PATH="${CARLAUE4_ROOT_FOLDER}/Content${i:5}"
|
||||
MAP_NAME=${XODR_FILE_PATH##*/}
|
||||
XODR_FILE=$(find "${CARLAUE4_ROOT_FOLDER}/Content" -name "${MAP_NAME}.xodr" -print -quit)
|
||||
if [ -f "${XODR_FILE}" ] ; then
|
||||
|
||||
if [ -f "${XODR_FILE}" ] ; then
|
||||
SUBST_FILE="${XODR_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
|
||||
|
||||
SUBST_FILE="${XODR_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
|
||||
# Copy the package config file to package
|
||||
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${XODR_FILE}" "$_"
|
||||
|
||||
fi
|
||||
|
||||
# binary files for navigation and traffic manager
|
||||
BIN_FILE_PATH="${CARLAUE4_ROOT_FOLDER}/Content${i:5}"
|
||||
MAP_NAME=${BIN_FILE_PATH##*/}
|
||||
find "${CARLAUE4_ROOT_FOLDER}/Content" -name "${MAP_NAME}.bin" -print0 | while read -d $'\0' BIN_FILE
|
||||
do
|
||||
if [ -f "${BIN_FILE}" ] ; then
|
||||
|
||||
SUBST_FILE="${BIN_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
|
||||
|
||||
# Copy the package config file to package
|
||||
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${XODR_FILE}" "$_"
|
||||
|
||||
fi
|
||||
|
||||
# binary files for navigation and traffic manager
|
||||
BIN_FILE_PATH="${CARLAUE4_ROOT_FOLDER}/Content${i:5}"
|
||||
MAP_NAME=${BIN_FILE_PATH##*/}
|
||||
find "${CARLAUE4_ROOT_FOLDER}/Content" -name "${MAP_NAME}.bin" -print0 | while read -d $'\0' BIN_FILE
|
||||
do
|
||||
if [ -f "${BIN_FILE}" ] ; then
|
||||
|
||||
SUBST_FILE="${BIN_FILE/${CARLAUE4_ROOT_FOLDER}/${SUBST_PATH}}"
|
||||
|
||||
# Copy the package config file to package
|
||||
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${BIN_FILE}" "$_"
|
||||
fi
|
||||
done
|
||||
mkdir -p "$(dirname ${SUBST_FILE})" && cp "${BIN_FILE}" "$_"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
||||
rm -Rf "./CarlaUE4/Metadata"
|
||||
rm -Rf "./CarlaUE4/Plugins"
|
||||
rm -Rf "./CarlaUE4/Content/${PACKAGE_NAME}/Maps/${PROPS_MAP_NAME}"
|
||||
rm -f "./CarlaUE4/AssetRegistry.bin"
|
||||
|
||||
if ${DO_TARBALL} ; then
|
||||
|
||||
if ${SINGLE_PACKAGE} ; then
|
||||
tar -rf ${DESTINATION} *
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue