summaryrefslogtreecommitdiff
path: root/install.sh
blob: 3c3c49b6ae3342bcc3d21c60ffc76c7f2b0e14f4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

if [ $# -lt 1 ]; then
    echo "usage: $0 user | global"
    exit 1
fi

shopt -s dotglob 2> /dev/null

case "$1" in
    user)
        echo "installing the user configuration..."
        find user -maxdepth 1 -mindepth 1 -exec cp -ivr {} ~ \;
        ;;
    global)
        echo "installing the global configuration..."
        find global -maxdepth 1 -mindepth 1 -exec cp -ivr {} / \;
        ;;
    *)
        echo "invalid command"
        ;;
esac