#!/bin/sh -veu # from =gear-cronbuild-apply-hooks # if watchfile is found, it probably should be passed by toplevel script find_watchfile() { local pkgname=$1 watchfile= for i in .gear/$pkgname*.watch $pkgname*.watch .gear/autobuild.watch .gear/*.watch *.watch ; do if [ -f $i ]; then watchfile=$i return 0 fi done watchfile=`find . -path '*/debian/watch' -type f | head -1` [ -f "$watchfile" ] && return 0 return 1 } # pkgname="$(gear --describe | awk '{print $1}')" find_watchfile "$pkgname" rpm-uscan --any-archive --watchfile="$watchfile" --force-action './.gear/gear-import-wrapper' || exit 0 rpm-uscan warn: In youtube-dl.watch no matching files for watch line https://github.com/rg3/youtube-dl/releases (?:.*?/)?youtube-dl-(\d[\d.]*).tar.gz