summaryrefslogtreecommitdiffstats
path: root/src/oh-applypatches
diff options
context:
space:
mode:
Diffstat (limited to 'src/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