[gnome-video-effects] Use only POSIX syntax in create_effect_previews.sh
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-video-effects] Use only POSIX syntax in create_effect_previews.sh
- Date: Mon, 10 Mar 2014 08:48:07 +0000 (UTC)
commit 4da5e8c6313b1be6a83572cfb6093b5d8e2a9705
Author: David King <amigadave amigadave com>
Date: Thu Sep 12 15:13:40 2013 +0100
Use only POSIX syntax in create_effect_previews.sh
tools/create_effect_previews.sh | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
---
diff --git a/tools/create_effect_previews.sh b/tools/create_effect_previews.sh
old mode 100644
new mode 100755
index c55df2e..28531f5
--- a/tools/create_effect_previews.sh
+++ b/tools/create_effect_previews.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh -e
# small script to generate previews of all effects. to generate them,
# you need a folder "preview" in $srcdir with a file "normal.jpg" in it.
@@ -19,16 +19,22 @@ PKG_NAME="gnome-video-effects"
exit 1
}
+test -d "$previewdir" || mkdir "$previewdir"
+test -f "$previewdir"/normal.jpg || exit 1
+
for i in $(ls $effectsdir/*.$suffix); do
name=$(basename ${i%.$suffix})
if [ ! -e "$previewdir/$name.jpg" ]; then
- if [[ ! "$ignore_effects" =~ "${name}" ]]; then
- echo -e "\n\nCreating preview for $name"
- gst-launch-1.0 filesrc location=$previewdir/normal.jpg ! decodebin ! videoconvert ! \
- $(grep PipelineDescription "$i" | sed "s/^PipelineDescription=//") ! \
- videoconvert ! jpegenc ! filesink location="$previewdir/$name.jpg"
- fi
+ case $ignore_effects in
+ *$name*) continue ;;
+ *)
+ echo -e "\n\nCreating preview for $name"
+ gst-launch-1.0 filesrc location=$previewdir/normal.jpg ! decodebin ! \
+ videoconvert ! \
+ $(grep PipelineDescription "$i" | sed "s/^PipelineDescription=//") ! \
+ videoconvert ! jpegenc ! filesink location="$previewdir/$name.jpg"
+ esac
fi
done
@@ -48,10 +54,12 @@ for i in $(ls $effectsdir/*.$suffix); do
echo "== $(grep Name "$i" | sed "s/^_Name=//") ($name.effect) =="
echo "$(grep Comment "$i" | sed "s/^_Comment=//")"
echo
- if [[ ! "$ignore_effects" =~ "${name}" ]]; then
- echo "{{attachment:$name.jpg}}"
- else
- echo "see [[http://effectv.sourceforge.net/$(echo $name | sed "s/actv//" | sed "s/tv$//").html]]"
- fi
+ case $ignore_effects in
+ *$name*)
+ echo "see [[http://effectv.sourceforge.net/$(echo $name | sed "s/actv//" | sed "s/tv$//").html]]"
+ continue ;;
+ *)
+ echo "{{attachment:$name.jpg}}"
+ esac
echo
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]