PKGBUILD/3PARTY/obs/deps3/move_to_repo.sh

21 lines
721 B
Bash
Raw Permalink Normal View History

2024-07-19 22:36:59 +05:00
#!/bin/bash
REPO="$(cat repo.txt | tr -d '[:blank:]' | tr -d '[:space:]')"
find . -mindepth 1 -maxdepth 3 -type f -name "*.pkg.tar.xz" -exec mv -v {} $REPO \;
find . -mindepth 1 -maxdepth 3 -type f -name "*.pkg.tar.xz.sig" -exec mv -v {} $REPO \;
find . -mindepth 1 -maxdepth 3 -type f -name "*.pkg.tar.xz" -delete
find . -mindepth 1 -maxdepth 3 -type f -name "*.pkg.tar.zst" -delete
find . -mindepth 1 -maxdepth 3 -type f -name "*.pkg.tar.zst.sig" -delete
find . -mindepth 1 -maxdepth 3 -type f -name "*.pkg.tar.xz.sig" -delete
echo "Ready"
sleep 5
process=$(ps x | grep konsole | grep $0 | awk '{print $1}')
if [ $(( "$process" + 0 )) -ne 0 ]; then
kill $(ps x | grep konsole | grep $0 | awk '{print $1}')
fi