summarylogtreecommitdiffstats
path: root/maxwell2d_create_gif.sh
diff options
context:
space:
mode:
authorSimon Doppler2015-12-29 18:51:33 +0100
committerSimon Doppler2015-12-29 18:51:33 +0100
commitb81974e0a629cecac8dc52c3aca155f28e0ee41c (patch)
tree3d9e08a1a0baf00d0b4bf2e254f5969bfa09e5bf /maxwell2d_create_gif.sh
downloadaur-b81974e0a629cecac8dc52c3aca155f28e0ee41c.tar.gz
Initial commit
Diffstat (limited to 'maxwell2d_create_gif.sh')
-rw-r--r--maxwell2d_create_gif.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/maxwell2d_create_gif.sh b/maxwell2d_create_gif.sh
new file mode 100644
index 000000000000..3da931f75f89
--- /dev/null
+++ b/maxwell2d_create_gif.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+conf="$1"
+pol="$2"
+
+usage() {
+ echo "Usage:"
+ echo " $0 <configuration> <polarization>"
+ echo " <configuration> must be a *.cfg file"
+ echo " <polarization> is either z or xy"
+}
+
+if [ -z "$pol" ] || [ -z "$conf" ] ; then
+ usage
+ exit
+else
+ cat "/usr/share/maxwell2d/default/domain.cfg" \
+ "/usr/share/maxwell2d/default/$pol.cfg" "$conf" | \
+ maxwell2d_gif epsilon_gif_file="$(basename "$conf" .cfg)_$pol.gif" - > "$(basename "$conf" .cfg)_$pol.gif"
+fi