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.$$"
if [ $n -ne 0 ]
then
printf '#ifdef DEFINE_SCRIPT_DATA\n'
- if [ $n -ne 0 ]
- then
- printf 'const uint16_t applet_numbers[] = {\n'
- for i in $custom_scripts $applet_scripts
- do
- # TODO support applets with names including invalid characters
- printf '\tAPPLET_NO_%s,\n' $i
- done
- printf '};\n'
- fi
+ printf 'const uint16_t applet_numbers[] = {\n'
+ for i in $custom_scripts $applet_scripts
+ do
+ # TODO support applets with names including invalid characters
+ printf '\tAPPLET_NO_%s,\n' $i
+ done
+ printf '};\n'
printf '#else\n'
- if [ $n -ne 0 ]
- then
- printf 'extern const uint16_t applet_numbers[];\n'
- fi
+ printf 'extern const uint16_t applet_numbers[];\n'
printf '#endif\n'
fi
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()
custom_loc="$1"
if [ -d "$custom_loc" ]
then
- for i in $(cd "$custom_loc"; ls *)
+ for i in $(cd "$custom_loc"; ls * 2>/dev/null)
do
- printf "APPLET_SCRIPTED(%s, scripted, BB_DIR_USR_BIN, BB_SUID_DROP, dummy)\n" $i;
+ printf "APPLET_SCRIPTED(%s, scripted, BB_DIR_USR_BIN, BB_SUID_DROP, scripted)\n" $i;
done
fi
}