Merge pull request #115 from madper/master

kpatch-build: prevent die if only part of objects have no change
This commit is contained in:
Seth Jennings 2014-04-10 22:40:18 -05:00
commit e1099dbbc1

View File

@ -248,11 +248,13 @@ cd "$TEMPDIR/orig"
FILES="$(find * -type f)"
cd "$TEMPDIR"
mkdir output
changed=0
for i in $FILES; do
mkdir -p "output/$(dirname $i)"
"$TOOLSDIR"/create-diff-object "orig/$i" "patched/$i" "output/$i" 2>&1 |tee -a "$LOGFILE"
[[ "${PIPESTATUS[0]}" -eq 0 ]] || die
[[ "${PIPESTATUS[0]}" -eq 0 ]] && changed=$((changed+1))
done
[[ "$changed" -gt 0 ]] || die "Fatal: all generated objects has no changed function."
echo "Building patch module: kpatch-$PATCHNAME.ko"
cp "$OBJDIR/.config" "$SRCDIR"