#!/bin/bash
diff_file=/etc/ostree/deploy_difflist
pending_commit=$(ostree admin status | grep "pending" | cut -d'.' -f1 | awk '{print $2}')
current_commit=$(ostree admin status | grep "*" | cut -d'.' -f1 | awk '{print $3}')

if [ x"$pending_commit" != x"$current_commit" ];then
    if [ ! -f $diff_file ];then
        touch $diff_file
    fi
    ostree diff $pending_commit $current_commit > $diff_file
fi



