From: Martin Langhoff <[email protected]>

---
 .../custom_scripts/prepare.20.custom_scripts.sh    |   20 ++++++++++++++++++++
 1 files changed, 20 insertions(+), 0 deletions(-)
 create mode 100644 modules/custom_scripts/prepare.20.custom_scripts.sh

diff --git a/modules/custom_scripts/prepare.20.custom_scripts.sh 
b/modules/custom_scripts/prepare.20.custom_scripts.sh
new file mode 100644
index 0000000..6bd35da
--- /dev/null
+++ b/modules/custom_scripts/prepare.20.custom_scripts.sh
@@ -0,0 +1,20 @@
+# Copyright (C) 2009 One Laptop Per Child
+# Licensed under the terms of the GNU GPL v2 or later; see COPYING for details.
+
+. $OOB__shlib
+
+oIFS=$IFS
+IFS=$'\n'
+BADSCRIPT='false'
+for line in $(env); do
+       [[ "${line:0:34}" == "CFG_custom_scripts__custom_script_" ]] || continue
+       script=${line#*=}
+       if [ ! -x $script ]; then
+           BADSCRIPT='yes'
+           echo "$script is not executable" 
+       fi
+done
+if [ "$BADSCRIPT" = 'yes' ];then
+    exit 1
+fi
+IFS=$oIFS
-- 
1.6.2.5

_______________________________________________
Devel mailing list
[email protected]
http://lists.laptop.org/listinfo/devel

Reply via email to