summarylogtreecommitdiffstats
path: root/.INSTALL
blob: 3916cce56edfde08c7680c79ceeb2989363783b6 (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
post_install() {
    if [ -f /opt/drivesync/config.yml ]; then
        rm /tmp/drivesync/config.yml
        cp /opt/drivesync/config.yml /tmp/drivesync/config.yml
        sudo rm -R /opt/drivesync
    fi

	sudo mv /tmp/drivesync/ /opt/

    echo "To use type in console 'drivesync'"
    echo "To modify the configuration, modify the file /opt/drivesync/config.yml"
    echo "To add as cronjob use crontab -e and paste"
    echo "'*/1 * * * * ruby /opt/drivesync/drivesync.rb' (without quote)"
}

post_upgrade() {
    if [ -f /opt/drivesync/config.yml ]; then
        rm /tmp/drivesync/config.yml
        cp /opt/drivesync/config.yml /tmp/drivesync/config.yml
        sudo rm -R /opt/drivesync
    fi

	sudo mv /tmp/drivesync/ /opt/

    echo "To use type in console 'drivesync'"
    echo "To modify the configuration, modify the file /opt/drivesync/config.yml"
    echo "To add as cronjob use crontab -e and paste"
    echo "'*/1 * * * * ruby /opt/drivesync/drivesync.rb' (without quote)"
}

post_remove() {
    sudo rm -R /opt/drivesync
    echo "Make sure to erase the cronjob with crontab -e"
    echo "and remove the line 'alias drivesync='ruby /opt/drivesync/drivesync.rb'"
    echo "from your .bashrc"
}