summaryrefslogtreecommitdiff
path: root/scripts/create-menu
diff options
context:
space:
mode:
authordir <dir@ableton.com>2017-08-01 16:21:27 +0200
committerdir <dir@ableton.com>2017-11-20 18:42:54 +0100
commit4f64194c550fb463a73d6e328c8e7a49377c7faf (patch)
treeed6ced36ba70a54e12277298f9697aa7b2cce896 /scripts/create-menu
parent23e23bd8162d96cdd35e055d63154accd0e062b1 (diff)
Add ADK_CUSTOM_TASKS_DIR variable to point to external tasks
Diffstat (limited to 'scripts/create-menu')
-rwxr-xr-xscripts/create-menu11
1 files changed, 9 insertions, 2 deletions
diff --git a/scripts/create-menu b/scripts/create-menu
index 3c0d87ca9..f087300b6 100755
--- a/scripts/create-menu
+++ b/scripts/create-menu
@@ -12,11 +12,18 @@ printf "source target/config/Config.in.system.default\n" >> target/config/Config
printf "source target/config/Config.in.system.choice\n" >> target/config/Config.in.system
# update tasks
-if [ -d "$topdir/tasks" ];then
+if [ -d "$topdir/tasks" -o -n "$ADK_CUSTOM_TASKS_DIR" ];then
printf "# autogenerated via scripts/create-menu\n" > $topdir/target/config/Config.in.tasks
printf "menu \"Tasks\"\n" >> $topdir/target/config/Config.in.tasks
printf "\tvisible if ADK_TARGET_OS_LINUX && !ADK_TARGET_CHOOSE_ARCH\n\n" >> $topdir/target/config/Config.in.tasks
- cat $topdir/tasks/* >> $topdir/target/config/Config.in.tasks 2>/dev/null
+
+ if [ -d "$topdir/tasks" ];then
+ cat $topdir/tasks/* >> $topdir/target/config/Config.in.tasks 2>/dev/null
+ fi
+ if [ -n "$ADK_CUSTOM_TASKS_DIR" -a -d "$ADK_CUSTOM_TASKS_DIR" ];then
+ printf "\n# tasks pulled from ADK_CUSTOM_TASKS_DIR='%s'\n" "$ADK_CUSTOM_TASKS_DIR" >> $topdir/target/config/Config.in.tasks
+ cat $ADK_CUSTOM_TASKS_DIR/* >> $topdir/target/config/Config.in.tasks 2>/dev/null
+ fi
printf "\nendmenu\n\n" >> $topdir/target/config/Config.in.tasks
fi