您只需将测试添加到升级后挂钩即可。
function test_for_theme(){
// Scrape /var/log/apt/history.log for newest upgrades
// Return 0 if $PACKAGE_NAME is not in the log
// Return a different integer if $PACKAGE_NAME is in the log
tail -n4 /var/log/apt/history.log | grep Upgrade | grep -c $PACKAGE_NAME
}
if [ test_for_theme -ne 0 ]; then
apply_patch
do_other_things
notify_me
fi
exit 0
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句