aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/embedded_scripts22
-rwxr-xr-xscripts/gen_build_files.sh4
2 files changed, 10 insertions, 16 deletions
diff --git a/scripts/embedded_scripts b/scripts/embedded_scripts
index c2e7c6961..86ad44d1d 100755
--- a/scripts/embedded_scripts
+++ b/scripts/embedded_scripts
@@ -81,21 +81,15 @@ exec >"$target.$$"
81if [ $n -ne 0 ] 81if [ $n -ne 0 ]
82then 82then
83 printf '#ifdef DEFINE_SCRIPT_DATA\n' 83 printf '#ifdef DEFINE_SCRIPT_DATA\n'
84 if [ $n -ne 0 ] 84 printf 'const uint16_t applet_numbers[] = {\n'
85 then 85 for i in $custom_scripts $applet_scripts
86 printf 'const uint16_t applet_numbers[] = {\n' 86 do
87 for i in $custom_scripts $applet_scripts 87 # TODO support applets with names including invalid characters
88 do 88 printf '\tAPPLET_NO_%s,\n' $i
89 # TODO support applets with names including invalid characters 89 done
90 printf '\tAPPLET_NO_%s,\n' $i 90 printf '};\n'
91 done
92 printf '};\n'
93 fi
94 printf '#else\n' 91 printf '#else\n'
95 if [ $n -ne 0 ] 92 printf 'extern const uint16_t applet_numbers[];\n'
96 then
97 printf 'extern const uint16_t applet_numbers[];\n'
98 fi
99 printf '#endif\n' 93 printf '#endif\n'
100fi 94fi
101 95
diff --git a/scripts/gen_build_files.sh b/scripts/gen_build_files.sh
index 64e4bffa9..362632df3 100755
--- a/scripts/gen_build_files.sh
+++ b/scripts/gen_build_files.sh
@@ -23,9 +23,9 @@ custom_scripts()
23 custom_loc="$1" 23 custom_loc="$1"
24 if [ -d "$custom_loc" ] 24 if [ -d "$custom_loc" ]
25 then 25 then
26 for i in $(cd "$custom_loc"; ls *) 26 for i in $(cd "$custom_loc"; ls * 2>/dev/null)
27 do 27 do
28 printf "APPLET_SCRIPTED(%s, scripted, BB_DIR_USR_BIN, BB_SUID_DROP, dummy)\n" $i; 28 printf "APPLET_SCRIPTED(%s, scripted, BB_DIR_USR_BIN, BB_SUID_DROP, scripted)\n" $i;
29 done 29 done
30 fi 30 fi
31} 31}