clean up script, remove WIP warning
authorSadoon Albader <sadoon@soulserv.xyz>
Fri, 25 Aug 2023 15:40:14 +0000 (18:40 +0300)
committerSadoon Albader <sadoon@soulserv.xyz>
Fri, 25 Aug 2023 15:40:14 +0000 (18:40 +0300)
test-vsx

index a0a566346f541e7cd6ccf7de2da04beb6fcb7627..7ac95ab4e153c3d4f96771ed2990386f9582e207 100755 (executable)
--- a/test-vsx
+++ b/test-vsx
@@ -1,27 +1,13 @@
-#!/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