Преглед изворни кода

Changes build.sh to use the variables OUTPUT_DIR and VERSIONS_INFO_DIR

Stefan Laudemann пре 9 година
родитељ
комит
48d48ec413
1 измењених фајлова са 4 додато и 4 уклоњено
  1. 4 4
      build.sh

+ 4 - 4
build.sh

@@ -53,7 +53,7 @@ pushd $MY_DIR > /dev/null
 . functions.sh
 
 ### CHECK THAT VERSION DOES NOT YET EXISTS
-[ -n "$VERSION" -a -x "versions/${VERSION}" ] && abort "There exists a version file for '$VERSION' ... you are trying to do something really stupid, aren't you?"
+[ -n "$VERSION" -a -x "${VERSIONS_INFO_DIR}/${VERSION}" ] && abort "There exists a version file for '$VERSION' ... you are trying to do something really stupid, aren't you?"
 
 ### INIT /src IF NECESSARY
 if [ ! -d "$CODE_DIR" ]; then
@@ -157,8 +157,8 @@ cd ..
 
 # compress all binaries into 7z archive
 progress "Assembling images.7z ..."
-[ -e "output/${BRANCH}/images.7z" ] && rm "output/${BRANCH}/images.7z"
-7z a "output/${BRANCH}/images.7z" ${CODE_DIR}/images/sysupgrade/*.bin ${CODE_DIR}/images/factory/*.bin || abort "Failed to assemble images (did you install p7zip-full?)."
+[ -e "${OUTPUT_DIR}/${BRANCH}/images.7z" ] && rm "${OUTPUT_DIR}/${BRANCH}/images.7z"
+7z a "${OUTPUT_DIR}/${BRANCH}/images.7z" ${CODE_DIR}/images/sysupgrade/*.bin ${CODE_DIR}/images/factory/*.bin || abort "Failed to assemble images (did you install p7zip-full?)."
 
 # generate, franken-merge, and copy manifests
 progress "Generating and copying manifest ..."
@@ -174,7 +174,7 @@ echo "PRIORITY=0" >> ${frankenmerge_manifest_file}
 echo "" >> ${frankenmerge_manifest_file}
 grep -hE "*.bin$" ./images/sysupgrade/*.${BRANCH}.manifest | sort >> ${frankenmerge_manifest_file}
 popd
-cp "${CODE_DIR}/images/sysupgrade/${BRANCH}.manifest" "output/${BRANCH}/"
+cp "${CODE_DIR}/images/sysupgrade/${BRANCH}.manifest" "${OUTPUT_DIR}/${BRANCH}/"
 
 # Saving a copy of the build info file as reference
 progress "Building a greater and brighter firmware finished successfully. Saving build information at: ${VERSIONS_INFO_DIR}/${VERSION}"