mirror of
https://gitlab.com/Nanolx/NanoDroid
synced 2024-10-31 09:20:23 +00:00
build-package: further fixes for Darwin/*BSD compat
This commit is contained in:
parent
e2b250d560
commit
be6ea8be55
@ -10,8 +10,14 @@ CWD=$(readlink -n "${BASH_SOURCE[0]}")
|
||||
CWD=$(dirname "${CWD}")
|
||||
|
||||
case $(uname -s) in
|
||||
*Darwin*) export sumsha256="shasum -a 256" ;;
|
||||
* ) export sumsha256="sha256sum" ;;
|
||||
*Darwin* | *BSD* )
|
||||
export sumsha256="shasum -a 256"
|
||||
export statx="stat -f %Z"
|
||||
;;
|
||||
*Linux* )
|
||||
export sumsha256="sha256sum"
|
||||
export statx="stat -c %Z"
|
||||
;;
|
||||
esac
|
||||
|
||||
# DIRS
|
||||
|
@ -58,7 +58,7 @@ index_update_required () {
|
||||
index_file=${1}
|
||||
|
||||
test ! -f ${index_file} && return 0
|
||||
test $(stat --format=%Z ${index_file}) -le $(($(date +%s) - 3600)) && return 0
|
||||
test $(${statx} ${index_file}) -le $(($(date +%s) - 3600)) && return 0
|
||||
test "$(file -b ${index_file})" == "empty" && return 0
|
||||
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user