summaryrefslogtreecommitdiff
path: root/yf-update
blob: ee5d3ebf4a3691e48f3d9beec0343fc9d863b6f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
source "$(dirname "$(readlink -e "$0")")/local_config"
source "$(dirname "$(readlink -e "$0")")/config"
source "$(dirname "$(readlink -e "$0")")/libremessages"

blacklist_mtime=$(printf "%.0f" $(find ${blacklist} -printf "%T@"))
last_bl_mtime=$(< "$(dirname "$(readlink -e "$0")")/yftime")

if [ $blacklist_mtime -gt $last_bl_mtime ]; then
    pushd "$(dirname "$(readlink -e "$0")")/yf"
    makepkg -f
    find . -name "*${PKGEXT}" -exec mv {} ${STAGING}/libre \;
    popd
    echo ${blacklist_mtime} > "$(dirname "$(readlink -e "$0")")/yftime"
    msg2 "built and staged"
else
    msg2 "nothing to do"
fi