From 46cd027a7ea826ba3760a057982a5833745aef6b Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 25 Jan 2012 13:20:08 -0500 Subject: Add output to oh-applypatches. --- diff --git a/src/oh-applypatches b/src/oh-applypatches index 44182f7..24438f2 100644 --- a/src/oh-applypatches +++ b/src/oh-applypatches @@ -29,8 +29,18 @@ if [ ${#} -ne 0 ]; then exit 1 fi +applied=false + if [ -d ../patches ]; then + # Iterate over patches ordered alphabetically by name. for patch in $(ls -1 ../patches | sort); do + printf 'oh-applypatches: Applying patch "%s"...\n' "${patch}" patch -N -p 1 -u -d src -i "../patches/${patch}" + applied=true done fi + +# Provide output even if patches directory didn't exist or had no visible files. +if ! ${applied}; then + printf 'oh-applypatches: No patches to be applied.\n' +fi -- cgit v0.9.1