summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-01-25 13:20:08 (EST)
committer P. J. McDermott <pjm@nac.net>2012-01-25 13:20:08 (EST)
commit46cd027a7ea826ba3760a057982a5833745aef6b (patch)
tree7f8f8b039d56576840792bea367c59373ad54cc8
parentcb6c574b6c3f79004d8ab112879b6f0dc1de6f9b (diff)
Add output to oh-applypatches.
-rw-r--r--src/oh-applypatches10
1 files changed, 10 insertions, 0 deletions
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