pkgmeek: fixed path in the check_pkg_mtime subroutine
This commit is contained in:
parent
ed6e13e791
commit
5c9a5a80a5
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
######################## main routine ################################
|
######################## main routine ################################
|
||||||
local o_ignored work _local_ here url u f errDL pkg_ood errUZ
|
local o_ignored work _local_ here url u f errDL errUZ; local pkg_ood=1
|
||||||
parse_options "$@"
|
parse_options "$@"
|
||||||
[ "$PKGMK_RECURSIVE" = "no" ] || recursive "$@"
|
[ "$PKGMK_RECURSIVE" = "no" ] || recursive "$@"
|
||||||
#
|
#
|
||||||
@ -88,7 +88,7 @@ done; }
|
|||||||
[ "$errDL" = 0 ] && info "Successfully obtained all source files."
|
[ "$errDL" = 0 ] && info "Successfully obtained all source files."
|
||||||
|
|
||||||
# If the user only asked for '-utd', perform the check using the sources that do exist.
|
# If the user only asked for '-utd', perform the check using the sources that do exist.
|
||||||
check_pkg_mtime && pkg_ood=0 || pkg_ood=1
|
check_pkg_mtime; pkg_ood=$?
|
||||||
[ "$PKGMK_MTIME_ONLY" = "no" ] || exit $pkg_ood
|
[ "$PKGMK_MTIME_ONLY" = "no" ] || exit $pkg_ood
|
||||||
|
|
||||||
[ "$PKGMK_DOWNLOAD_ONLY" = "yes" ] || [ "$PKGMK_UPDATE_MD5" = "yes" ] \
|
[ "$PKGMK_DOWNLOAD_ONLY" = "yes" ] || [ "$PKGMK_UPDATE_MD5" = "yes" ] \
|
||||||
@ -373,16 +373,17 @@ check_reqvars () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_pkg_mtime() { # can be called even if some sources are missing
|
check_pkg_mtime() { # can be called even if some sources are missing
|
||||||
local status=1; local li=0; local pkg_ood="yes"
|
local status=1; local li=0; local pkg_ood="yes"; local msg
|
||||||
local msg="$package is not up to date."
|
msg="$package is not up to date."
|
||||||
|
|
||||||
if [ -f "$package" ]; then
|
if [ -f "$pkg_dir/$package" ]; then
|
||||||
pkg_ood="no"
|
pkg_ood="no"
|
||||||
while [ $li -lt ${#_local_[@]} ] && [ "$pkg_ood" = "no" ]; do
|
while [ $li -lt ${#_local_[@]} ] && [ "$pkg_ood" = "no" ]; do
|
||||||
[ ! -e "${_local_[$li]}" ] || [ "$package" -nt "${_local_[$li]}" ] || pkg_ood="yes"
|
[ ! -e "${_local_[$li]}" ] || \
|
||||||
|
[ $(realpath "${_local_[$li]}") -nt "$package" ] || pkg_ood="yes"
|
||||||
li=$(( li+1 ))
|
li=$(( li+1 ))
|
||||||
done
|
done
|
||||||
[ ! -e Pkgfile ] || [ "$package" -nt Pkgfile ] || pkg_ood="yes"
|
[ ! -e Pkgfile ] || [ Pkgfile -nt "$package" ] || pkg_ood="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ "$pkg_ood" = "yes" ] || { status=0; msg="$package is up to date."; }
|
[ "$pkg_ood" = "yes" ] || { status=0; msg="$package is up to date."; }
|
||||||
|
Loading…
Reference in New Issue
Block a user