summaryrefslogtreecommitdiffstats
path: root/main.sh
blob: 02686430ac2398a7e856edb07b62a1cbba51fc13 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
##
# 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

    if [[ "$1" == "checkout" ]]; then
        systr_checkout $@
    elif [[ "$1" == "status" ]]; then
        systr_status $@
    elif [[ "$1" == "commit" ]]; then
        systr_commit $@
    else
        echo "Error: $1 not recognized"
    fi
}

main $@