Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 2c8d9a18a5
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (41 sloc) 1.617 kB
#!/bin/bash
#############################################################
# #
# check-find.plugin - plugin that performs file presence #
# checking of installed modules #
# #
#############################################################
# #
# Copyright 2005 by Auke Kok under GPLv2 #
# #
#############################################################
plugin_module_check_find() {
local MODULE VERSION I_LOG FIND_STATUS IFS_OLD IFS LOG ITEM
if [ "$FIND_CHECK" == "off" ] ; then
return 2
fi
debug_msg "plugin_module_check_find ($@)"
MODULE=$1
VERSION=$(installed_version $MODULE)
I_LOG=$INSTALL_LOGS/$MODULE-$VERSION
FIND_STATUS=2
if [ -e "$I_LOG" ]; then
IFS_OLD="$IFS"
export IFS=$'\n'
LOG=$(cat "$I_LOG" | grep "/bin/\|/games/\|/include/\|/lib/\|/sbin/" | grep -v "/doc/\|/etc/\|/fonts/\|/man/\|/var/")
for ITEM in $LOG ; do
if [ ! -e "$ITEM" ]; then
(
export IFS="$IFS_OLD"
message "${FILE_COLOR}${ITEM}${DEFAULT_COLOR} of ${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing.${DEFAULT_COLOR}"
)
FIND_STATUS=1
fi
done
else
message "${MODULE_COLOR}${MODULE}${PROBLEM_COLOR} is missing an install log.${DEFAULT_COLOR}"
FIND_STATUS=1
fi
return $FIND_STATUS
}
plugin_register MODULE_CHECK plugin_module_check_find
Jump to Line
Something went wrong with that request. Please try again.