darling script: fix check_prefix

Fix mistake I made in 0b1ca75
This commit is contained in:
Xorg 2016-02-26 21:21:07 +01:00
parent e373a28a1f
commit 44cddf5e36

View File

@ -25,12 +25,15 @@ DARLING_PREFIX=$(realpath "$SCRIPTPATH/..")
selfmtime=$(stat -c %Y "$DARLING_PREFIX/bin/darling")
check_prefix() {
if [ ! -d "$DPREFIX" -o ! -f "$DPREFIX/.prefix-version" ]; then
setup_prefix "$DPREFIX"
fi
if [ "$(cat $DPREFIX/.prefix-version)" -lt $MINIMUM_PREFIX_VERSION ]; then
if [ ! -d "$DPREFIX" -o ! -f "$DPREFIX/.update-timestamp" ]; then
setup_prefix "$DPREFIX"
else
updatets=$(cat $DPREFIX/.update-timestamp)
if [ "$updatets" != "disable" -a "$updatets" -lt $selfmtime ]; then
setup_prefix "$DPREFIX"
fi
fi
}