commit 2be303adcb48b39be394b1c852a331196065fc03
parent 7b3b5f96ee4476c90a10eddb7472473643f36837
Author: bsandro <email@bsandro.tech>
Date: Fri, 16 Oct 2026 19:32:06 +0300
shellscripts are more portable now (works on netbsd11)
Diffstat:
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/commands/gen_registry.sh b/commands/gen_registry.sh
@@ -7,7 +7,7 @@ echo '/* DO NOT MODIFY! REGENERATED WITH gen_registry.sh */'
echo '#include "core/command.h"'
for f in *.c; do
- str="$(basename -s.c $f)";
+ str="$(basename $f .c)";
fun="cmd_${str,,}";
echo "Command_Func $fun;";
done
@@ -15,7 +15,7 @@ done
echo 'static const Command COMMANDS[] = {'
for f in *.c; do
- str="$(basename -s.c $f)";
+ str="$(basename $f .c)";
fun="cmd_${str,,}";
echo ' { "'$str'", '$fun' },';
done
diff --git a/components/populate.sh b/components/populate.sh
@@ -11,8 +11,8 @@ echo '#pragma once' > _include.h
for f in *.h; do
if [[ "$f" == _* ]]; then continue; fi
echo "Components: populating $f..."
- struct=`sed -n 's/^typedef struct \([A-Za-z_]*\?\).*/\1/p' $f`
- str="$(basename -s.h $f)";
+ struct=`sed -n 's/^typedef struct \([A-Za-z_]*\).*/\1/p' $f`
+ str="$(basename $f .h)";
comp="COMPONENT_${str^^}";
echo "$struct $str;" >> _registry.inc
echo "$comp," >> _types.inc