summaryrefslogtreecommitdiff
path: root/scripts/build/source_hooks
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-05-20 08:19:39 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2015-05-20 08:19:56 +0200
commit50794b1de1b0211ee4c040a83bba9a5f3148d066 (patch)
tree81416e66e8478945470b097fd69436ef9fe98625 /scripts/build/source_hooks
parent3c303e7f53f7843c1f621d0889c4c6fec241ffbf (diff)
downloadvyos-live-build-50794b1de1b0211ee4c040a83bba9a5f3148d066.tar.gz
vyos-live-build-50794b1de1b0211ee4c040a83bba9a5f3148d066.zip
Splitting non-live specific hooks into their own subdirectory within hooks.
Diffstat (limited to 'scripts/build/source_hooks')
-rwxr-xr-xscripts/build/source_hooks35
1 files changed, 18 insertions, 17 deletions
diff --git a/scripts/build/source_hooks b/scripts/build/source_hooks
index 6f3e08dcd..d3059de98 100755
--- a/scripts/build/source_hooks
+++ b/scripts/build/source_hooks
@@ -58,21 +58,22 @@ do
done
## Processing local hooks
+for HOOK in config/hooks/normal/*.source config/hooks/live/*.source
+do
+ if [ ! -e "${HOOK}" ]
+ then
+ continue
+ fi
+
+ # Making hook executable
+ if [ ! -x "${HOOK}" ]
+ then
+ chmod +x "${HOOK}"
+ fi
+
+ # Executing hook
+ ./"${HOOK}" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
+done
-if Find_files config/hooks/live/*.source
-then
- for HOOK in config/hooks/live/*.source
- do
- # Making hook executable
- if [ ! -x "${HOOK}" ]
- then
- chmod +x "${HOOK}"
- fi
-
- # Executing hook
- ./"${HOOK}" || { Echo_error "${HOOK} failed (exit non-zero). You should check for errors."; exit 1 ;}
- done
-
- # Creating stage file
- Create_stagefile .build/source_hooks
-fi
+# Creating stage file
+Create_stagefile .build/source_hooks