#!/bin/sh set -e echo "Running zap2xml" node dist/index.js echo "Checking if xmltv file exists" if test -e "$OUTPUT_FILE"; then echo "Attempting to upload to S3" s3cmd put $OUTPUT_FILE "$S3_URL/$PUBLIC_FILENAME" echo "Setting file to public" s3cmd setacl "$S3_URL/$PUBLIC_FILENAME" --acl-public else echo "File not found, exiting" exit 1 fi