61 lines
1.8 KiB
Bash
Executable File
61 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
REPO="/data/github/active/Melawy/REPO/melawy-3party/x86_64/"
|
|
|
|
echo -n $( dirname -- "$( readlink -f -- "$0" )" ) > pwd.txt
|
|
|
|
CWD=$(cat pwd.txt)
|
|
|
|
for package_dir in $(find . -mindepth 1 -maxdepth 1 -type d)
|
|
do
|
|
cd $CWD/$package_dir
|
|
makepkg --syncdeps --asdeps --needed --noconfirm --clean --cleanbuild --force
|
|
|
|
for i in *.pkg.tar.zst;
|
|
do
|
|
if [ -f "${i}" ]; then
|
|
echo "Удаление подписи $i.sig"
|
|
rm -f $i.sig
|
|
echo "Добавление подписи $i.sig"
|
|
gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output "$i.sig" "$i"
|
|
fi
|
|
done
|
|
|
|
for i in *.pkg.tar.xz;
|
|
do
|
|
if [ -f "${i}" ]; then
|
|
echo "Удаление подписи $i.sig"
|
|
rm -f $i.sig
|
|
echo "Добавление подписи $i.sig"
|
|
gpg --detach-sign --local-user BC8B600E8DDA1F4CB77B10D2BA803A261A5EE6B8 --output "$i.sig" "$i"
|
|
fi
|
|
done
|
|
|
|
package_file=$(ls -1 | grep -v "pkg.tar.zst.sig" | grep "pkg.tar.zst")
|
|
if [ -f "$CWD/$package_dir/$package_file" ]; then
|
|
mv -v $CWD/$package_dir/$package_file $REPO/
|
|
fi
|
|
|
|
package_file=$(ls -1 | grep -v "pkg.tar.xz.sig" | grep "pkg.tar.xz")
|
|
if [ -f "$CWD/$package_dir/$package_file" ]; then
|
|
mv -v $CWD/$package_dir/$package_file $REPO/
|
|
fi
|
|
|
|
package_file=$(ls -1 | grep "pkg.tar.xz.sig")
|
|
if [ -f "$CWD/$package_dir/$package_file" ]; then
|
|
|
|
mv -v $CWD/$package_dir/$package_file $REPO/
|
|
fi
|
|
|
|
package_file=$(ls -1 | grep "pkg.tar.zst.sig")
|
|
if [ -f "$CWD/$package_dir/$package_file" ]; then
|
|
|
|
mv -v $CWD/$package_dir/$package_file $REPO/
|
|
fi
|
|
|
|
cd $CWD
|
|
done
|
|
|
|
echo "melawy" | beep -f 200 -l 250 -d 100 -r 1 -n -s
|
|
notify-send -a "$(basename $(pwd)): Make and Move to" -t 999999999 "$REPO" "$(date '+%Y.%m.%d %H:%M:%S')"
|