acoeur/bin/ac_route.sh
2022-10-26 23:12:29 +02:00

22 lines
523 B
Bash
Executable File

#!/bin/sh
# Routing acoeur commands to corresponding shell command
echo "Triggering command for $1 $2"
cd "$(dirname "$0")" || exit
case $2 in
*.create) ./_commands/create.sh "$1" "$2";;
*.delete) ./_commands/delete.sh "$1" "$2";;
*.choice) ./_commands/choice.sh "$1" "$2";;
*.content) ./_commands/content.sh "$1" "$2";;
*.prop) ./_commands/prop.sh "$1" "$2";;
*.md) ./_commands/default_actions.sh "$1" "$2";;
esac
case $2 in
*.md|*.result|*.jpg|*.png|*.gif) ;;
*.*) echo "Deleting $1/$2" && rm "$1/$2";;
esac