-#!/bin/bash
-
-echo "SCRIPT IS STILL WIP, DO NOT RUN"
+#!/bin/zsh
CHROOT=/opt/chroot/gentoo-sffs
-BINDIRS=($CHROOT/bin $CHROOT/sbin $CHROOT/usr/libexec)
-
-failed=false
+OBJDIRS=($CHROOT/sbin $CHROOT/bin $CHROOT/usr/libexec $CHROOT/usr/bin $CHROOT/usr/sbin)
-for dir in $BINDIRS
+for dir in $OBJDIRS
do
for bin in $(ls -1 $dir)
do
- if $(fgrep -qof VSX_INSNS.txt $dir/$bin | sort | uniq -c | awk '{print $2 " " $1}'); then
- echo "VSX instructions found in $bin"
- failed=true
- fi
+ echo "testing $dir/$bin"
+ objdump -d $dir/$bin | fgrep -of VSX_INSNS.txt | sort | uniq -c | awk '{print $2 " " $1}'
done
done
-
-
-
-if $failed; then
- echo "Test failed"
-else
- echo "Test succeeded!"
-fi