Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall authored Mar 6, 2025
1 parent b2462fb commit 1afcac9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions examples/hls/cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ NODE_URL="$2"
NID=$(basename "$NODE_URL")
TMP_DIR=$(mktemp -d)

cleanup() {
rm -rf "$TMP_DIR"
}
trap cleanup EXIT

ffmpeg \
-f "$SOURCE_MIMETYPE" \
-i - \
Expand Down Expand Up @@ -39,5 +44,3 @@ curl -s \
-H "Content-Location: private://derivatives/hls/$NID/hls.tar.gz" \
-T "$TMP_DIR/hls.tar.gz" \
"$NODE_URL/media/file/$TID"

rm -rf "$TMP_DIR"

0 comments on commit 1afcac9

Please sign in to comment.