## # systrunk [, ...] # # 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 "$@" else echo "Fatal: $cmd not recognized" fi } main "$@"