Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e0bcc6a authored by Jackeagle's avatar Jackeagle
Browse files

Path fixes

parent 50a3b064
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -18,20 +18,20 @@ chmod +x /root/build.sh
echo ">> [$(date)] Starting build with site survey monitoring"
/root/site_survey.sh /root/build.sh

# Move the generated survey tarball to ZIP_DIR
# The site_survey.sh creates incredibuild_logs_*.tgz in the current directory
# Move the generated survey zip file to ZIP_DIR
# The site_survey.sh creates incredibuild_logs_*.zip in SRC_DIR (where build.sh runs)
if [ -n "$ZIP_DIR" ] && [ -d "$ZIP_DIR" ]; then
  echo ">> [$(date)] Moving site survey results to $ZIP_DIR"
  find /root -maxdepth 1 -name "incredibuild_logs_*.tgz" -type f -exec mv {} "$ZIP_DIR/" \;
  find "$SRC_DIR" -maxdepth 1 -name "incredibuild_logs_*.zip" -type f -exec mv {} "$ZIP_DIR/" \;

  # Check if any files were moved
  if ls "$ZIP_DIR"/incredibuild_logs_*.tgz 1> /dev/null 2>&1; then
  if ls "$ZIP_DIR"/incredibuild_logs_*.zip 1> /dev/null 2>&1; then
    echo ">> [$(date)] Site survey results saved to $ZIP_DIR"
  else
    echo ">> [$(date)] Warning: No site survey results found to move"
  fi
else
  echo ">> [$(date)] Warning: ZIP_DIR not set or doesn't exist, survey results remain in /root"
  echo ">> [$(date)] Warning: ZIP_DIR not set or doesn't exist, survey results remain in $SRC_DIR"
fi

echo ">> [$(date)] Build with site survey monitoring completed"
+3 −3
Original line number Diff line number Diff line
@@ -44,10 +44,10 @@ function main()
  
  #Handle logs
  build_date=$(LANG="en_US.UTF-8" LC_TIME="en_US.UTF-8" TZ="UTC" date +"%Y%m%d%H%M%S")
  dest_filename="incredibuild_logs_$build_date.tgz"
  tar -czf "$dest_filename" ./exported_log || {
  dest_filename="incredibuild_logs_$build_date.zip"
  zip -r "$dest_filename" ./exported_log || {
      echo "Failed to compress, retrying ..."
      tar -cf "$dest_filename" ./exported_log || return
      zip -r "$dest_filename" ./exported_log || return
  }
  clean_files || return
  echo "The output file $dest_filename created in CWD, please share the file with Incredibuild Solution Architect"