summaryrefslogtreecommitdiff
path: root/harmoneff/alle_harmoneff
diff options
context:
space:
mode:
Diffstat (limited to 'harmoneff/alle_harmoneff')
-rwxr-xr-xharmoneff/alle_harmoneff38
1 files changed, 38 insertions, 0 deletions
diff --git a/harmoneff/alle_harmoneff b/harmoneff/alle_harmoneff
new file mode 100755
index 0000000..6f6336f
--- /dev/null
+++ b/harmoneff/alle_harmoneff
@@ -0,0 +1,38 @@
+#!/bin/sh
+# usage: ./alle_harmoneff output "whatever needs the harmoneff after the filename(s)" file1 file2 ...
+
+if [ -e "$1" ]
+then
+ echo "$1 existiert bereits! Ueberschreiben (u/j), anhaengen (a/n) oder abbrechen?"
+ read was
+ if [ "$was" != "u" ] && [ "$was" != "j" ] && [ "$was" != "a" ] && [ "$was" != "n" ]
+ then
+ echo "Okay, abbrechen!"
+ exit 0
+ fi
+ if [ "$was" == "u" ] || [ "$was" == "j" ]
+ then
+ echo "Okay, ueberschreiben!"
+ rm "$1"
+ else
+ echo "Okay, anhaengen!"
+ fi
+fi
+
+inputs[0]=""
+for t in $*
+do
+ if [ "$t" != "$1" ] && [ "$t" != "$2" ]
+ then
+ for s in $(./sammle_inputfiles $t)
+ do
+ inputs[${#inputs[*]}]=$s
+ done
+ fi
+done
+
+for ((i=0; i<${#inputs[*]}; i++))
+do
+ s=${inputs[$i]}
+ ./harmoneff $1 $s $2
+done