blob: 957cc24186b0295a5a60c098b214635b6d8312a2 (
plain) (
tree)
|
|
##
# systrunk <command> [<options>, ...]
#
# A version control system powered by rsync, focused on tracking large
# directory trees with large files, even binary files; system images.
#
# Main function, decide what to do ...
##
function main
{
if [ $# -eq 0 ]; then
echo "Error: no command given"
exit
fi
cmd="$1"
shift
if [ $# -gt 1 ]; then
if [[ "$cmd" == "checkout" ]]; then
systr_checkout "$@"
exit
fi
fi
read remote <.systr/remote
read path <.systr/path
read BASE <.systr/BASE
read TRAC <.systr/TRAC
if [[ "$cmd" == "checkout" ]]; then
systr_checkout "$@"
elif [[ "$cmd" == "status" ]]; then
systr_status "$@"
elif [[ "$cmd" == "commit" ]]; then
systr_commit "$@"
elif [[ "$cmd" == "tag" ]]; then
systr_repo_tag "$@"
elif [[ "$cmd" == "log" ]]; then
systr_repo_generate_log "$@"
else
echo "Fatal: $cmd not recognized"
fi
}
main "$@"
|