acoeur/bin/ac_route.sh

23 lines
517 B
Bash
Raw Normal View History

2022-10-26 23:12:29 +02:00
#!/bin/sh
# Routing acoeur commands to corresponding shell command
2022-11-07 22:30:43 +01:00
echo
echo "Triggering command for ${1##*/content/} $2"
2022-10-26 23:12:29 +02:00
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) ;;
*.*) rm "$1/$2";;
2022-10-26 23:12:29 +02:00
esac