appimage-lister-uniq.sh 453 B

123456789101112131415
  1. #!/bin/sh
  2. DIRS=$(find . -type d | grep "/" | sed 's:.*/::')
  3. for arch in $DIRS; do
  4. rm -f "$arch-appimages"
  5. ARGS=$(awk -v FS="(◆ | : )" '{print $2}' <"$arch-apps")
  6. for arg in $ARGS; do
  7. if grep -qe "appimage-extract\|mage\$\|tmp\/\*mage" "./$arch/$arg" 1> /dev/null; then
  8. if ! grep "◆ $arg :" "$arch-apps" | grep -ie "\"kdegames\"\|\"kdeutils\"" 1> /dev/null; then
  9. grep "◆ $arg :" "$arch-apps" >> "$arch-appimages"
  10. fi
  11. fi
  12. done
  13. done