2021-04-27 11:41:35 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-05-24 15:09:45 +02:00
|
|
|
source /etc/de-p1st-repo/arch-repo.cfg || exit $?
|
2021-04-27 11:41:35 +02:00
|
|
|
|
|
|
|
|
2021-05-24 15:09:45 +02:00
|
|
|
cd "${LOCAL_PKG_DIR}" || exit $?
|
2021-04-27 11:41:35 +02:00
|
|
|
|
|
|
|
match="0"
|
|
|
|
for PKG in ./*.pkg.tar.{xz,zst}; do
|
2021-05-13 21:26:12 +02:00
|
|
|
[ -f "$PKG" ] || { echo "No match for pattern $PKG"; continue; } # alternatively: shopt -s nullglob
|
2021-04-27 11:41:35 +02:00
|
|
|
|
|
|
|
# if we are here, there is at least one match!
|
|
|
|
match="1"
|
|
|
|
break
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$match" = "1" ]; then
|
|
|
|
shopt -s nullglob
|
|
|
|
# print all matching
|
|
|
|
echo ./*.pkg.tar.{xz,zst}
|
|
|
|
fi
|