iglunix/linux/musl/glob.sh
2021-10-11 17:30:25 +01:00

23 lines
485 B
Bash
Executable file

#!/bin/sh
ARCH=$1
MALLOC_IMPL=mallocng
ARCH_FILES=src/*/x86_64/*.[csS]
HAVE=$(echo $ARCH_FILES | tr ' ' '\n' | sed 's|'$ARCH/'||g' | cut -d'.' -f 1)
echo $ARCH_FILES | tr ' ' '\n'
FILES=$(echo src/*/*.[csS] | tr ' ' '\n')
for have in $HAVE; do
FILES=$(echo $FILES | tr ' ' '\n' | grep -v $have'.[csS]')
done
echo $FILES | tr ' ' '\n'
echo src/malloc/$MALLOC_IMPL/*.[csS] | tr ' ' '\n'
#find src/*/ -maxdepth 1 -name '*.[csS]'
#find src/*/$ARCH -maxdepth 1 -name '*.[csS]'