aboutsummaryrefslogtreecommitdiff
path: root/macos.local/.flake/home/scripts/test.sh
blob: 084b317c98b9997dca6692a842ae13e953cd3bdd (plain)
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
28
29
30
31
32
33
#!/bin/sh

usage ()
{
    echo "Usage: $0 [-u/-i]"
}

dir="$pwd"
cd ~/.dotfiles || exit 1

while getopts ":hui" arg; do
    case "$arg" in
        h)
            usage
            cd "$dir" || exit 1
            exit 0
            ;;
        u)
            make update
            cd "$dir" || exit 1
            exit 0
            ;;
        i)
            make install
            cd "$dir" || exit 1
            exit 0
            ;;
        *)
            cd "$dir" || exit 1
            exit 1
            ;;
    esac
done