|
|
|
@ -41,7 +41,6 @@ mktimestamps() {
|
|
|
|
|
checkdirs="${DIRECTORY}/apps
|
|
|
|
|
${DIRECTORY}/data/settings
|
|
|
|
|
${DIRECTORY}/data/status
|
|
|
|
|
${DIRECTORY}/data/categories
|
|
|
|
|
${DIRECTORY}/etc"
|
|
|
|
|
|
|
|
|
|
timestamps=''
|
|
|
|
@ -50,15 +49,15 @@ ${DIRECTORY}/etc"
|
|
|
|
|
for dir in $checkdirs
|
|
|
|
|
do
|
|
|
|
|
timestamps="$timestamps
|
|
|
|
|
${dir}/$(ls -t "$dir" | head -n1)
|
|
|
|
|
$(stat -c %Y "${dir}/$(ls -t "$dir" | head -n1)")"
|
|
|
|
|
dir $dir $(stat -c %Y "${dir}/$(ls -t "$dir" | head -n1)")"
|
|
|
|
|
done
|
|
|
|
|
IFS="$PREIFS"
|
|
|
|
|
#remove first empty newline and check a few other things for changes too
|
|
|
|
|
timestamps="$prefix
|
|
|
|
|
$format
|
|
|
|
|
$(ls -1q "${DIRECTORY}/apps"/* | wc -l)
|
|
|
|
|
$(sha256sum "${DIRECTORY}/preload" | awk '{print $1}')
|
|
|
|
|
timestamps="prefix: $prefix
|
|
|
|
|
format: $format
|
|
|
|
|
number of files: $(ls -1q "${DIRECTORY}/apps"/* | wc -l)
|
|
|
|
|
preload shasum: $(sha256sum "${DIRECTORY}/preload" | awk '{print $1}')
|
|
|
|
|
structure shasum: $(shasum "${DIRECTORY}/data/categories/structure" | awk '{print $1}')
|
|
|
|
|
${timestamps:1}"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -75,7 +74,9 @@ if [ -f "$timestampfile" ];then
|
|
|
|
|
else
|
|
|
|
|
#timestamps don't match, so reload the list
|
|
|
|
|
reloadlist=1
|
|
|
|
|
echo "Timestamps don"\'"t match" 1>&2
|
|
|
|
|
echo "Timestamps don't match" 1>&2
|
|
|
|
|
|
|
|
|
|
echo -e "original file: $(cat "$timestampfile")\nnew timestamp: $timestamps" 1>&2
|
|
|
|
|
fi
|
|
|
|
|
else
|
|
|
|
|
#timestamp file not found
|
|
|
|
@ -83,7 +84,7 @@ else
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [ ! -f "$listfile" ] || [ -z "$(cat "$listfile")" ];then
|
|
|
|
|
echo "list file does not exist." 1>&2
|
|
|
|
|
echo "list file for $prefix does not exist." 1>&2
|
|
|
|
|
reloadlist=1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|