#!/bin/bash LLX_LIB="/usr/share/lliurex/llxcfg-common/llxcfg-common.sh" [ -f "${LLX_LIB}" ] || exit 0 . ${LLX_LIB} gen_md5(){ md5-encode "$(tree -fin $LLXCFG_JUMBLE_SKEL $LLXCFG_JUMBLE_TEMPLATES)" } save_md5(){ echo "$NEW_MD5SUM" |llxcfg-install - "$LLXCFG_JUMBLE_MD5SUM" } NEW_MD5SUM="$(gen_md5)" if [ -r "$LLXCFG_JUMBLE_MD5SUM" ] ; then read OLD_MD5SUM < "$LLXCFG_JUMBLE_MD5SUM" if [ "$OLD_MD5SUM" = "$NEW_MD5SUM" ] ; then # NO upgrade exit 1 fi fi save_md5 # let's go with the upgrade exit 0