summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-02 14:35:12 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-02-02 14:35:38 +0100
commitea37fdbf7acee96f07dd709b2cbf545dd9b42a50 (patch)
tree333aeeb8807760eff01b2d043814345aebaaa020 /src
parent25ef8814487f0cb34d553ad0503c2f61f88e294f (diff)
downloadadvtime-ea37fdbf7acee96f07dd709b2cbf545dd9b42a50.tar.gz
advtime-ea37fdbf7acee96f07dd709b2cbf545dd9b42a50.tar.bz2
advtime-ea37fdbf7acee96f07dd709b2cbf545dd9b42a50.zip
cutint: Do not use arrays but a string to store tmp files
Diffstat (limited to 'src')
-rwxr-xr-xsrc/cutint.sh8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cutint.sh b/src/cutint.sh
index ce53e99..0157dc4 100755
--- a/src/cutint.sh
+++ b/src/cutint.sh
@@ -1,6 +1,6 @@
#!/bin/sh
-parts=( )
+parts=""
if [ $# -lt 5 ]; then
printf "usage: %s input output [start duration [start duration ...]]\n" $0 2>&1
@@ -19,11 +19,11 @@ do
echo $tmp
ffmpeg -y -i "$input" -sameq -ss "$1" -t "$2" "$tmp"
- parts=( $parts $tmp )
+ parts=$(printf "%s|%s" "$parts" "$tmp")
shift
shift
done
-ffmpeg -y -i concat:$(printf "|%s" "${parts[@]}" | sed 's/^|//') -vcodec copy -acodec copy "$output"
-rm "${parts[@]}"
+ffmpeg -y -i concat:$(echo "$parts" | sed 's/^|//') -vcodec copy -acodec copy "$output"
+rm $(echo $parts | sed 's/|/ /g')