summarylogtreecommitdiffstats
path: root/deej.install
blob: 8667e50500edc4ee704d2090416c9a9955f48f19 (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
34
35
36
37
post_install() {
    echo ""
    note_header "IMPORTANT INFORMATION ABOUT DEEJ:"
    note "A sample configuration is included at /opt/deej/default-config.yaml"
    note "You must create your own configuration at /opt/deej/config.yaml"
    note ""
    note "Deej must run from the same directory as it's configuration file"
    note "The provided .desktop entry will accomplish this for you"
    note ""
    note "https://github.com/omriharel/deej#how-to-run"
    echo ""

    if [[ ! -f /opt/deej/config.yaml ]]; then
        cp -r /opt/deej/default-config.yaml /opt/deej/config.yaml
        chmod a+rw /opt/deej/config.yaml
    fi
}

post_upgrade() {
    post_install
}

pre_remove() {
    rm -rf /opt/deej/logs
}

# Pacman-like colors
reset="$(tput sgr0)"
bold="${reset}$(tput bold)"
blue="${bold}$(tput setaf 4)"
yellow="${bold}$(tput setaf 3)"
note_header() {
    printf "${yellow}==> NOTE: ${bold}$1${reset}\n"
}
note() {
    printf "${blue}  -> ${bold}$1${reset}\n"
}