#!/bin/sh
if [ $# -eq 0 ]; then
/usr/bin/printf "USAGE: backup COMMAND\n"
exit 1
fi
while [[ $# -gt 0 ]]; do
case "$1" in
-h|--help|help)
/usr/bin/printf "backup COMMAND\n"
/usr/bin/printf "Commands:\n"
/usr/bin/printf " help show help text\n"
/usr/bin/printf " files backup local files\n"
/usr/bin/printf " legal backup a legal documents directory\n"
/usr/bin/printf " music backup a music media directory\n"
exit 0
;;
files)
shift
exec /usr/local/bin/backup-files $@
;;
legal)
shift
exec /usr/local/bin/backup-legal $@
;;
music)
shift
exec /usr/local/bin/backup-music $@
;;
*)
/usr/bin/printf "Unknown command '%s'\n" "$1"
exit 1
;;
esac
done