summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-01-03 15:38:40 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-01-03 15:38:40 +0000
commit470f05214258fac6981251cd81a17ed4b012bcc0 (patch)
treeed95c095f5106306841ca4a5caf08a681da3c016
parent308a1a27f4e0ca3692e3dbd970ae28a8e5289b37 (diff)
downloadabuild-470f05214258fac6981251cd81a17ed4b012bcc0.tar.bz2
abuild-470f05214258fac6981251cd81a17ed4b012bcc0.tar.xz
abuild: implement sourcecheck
This subcommand verifies if upstream sources still exists and echoes an error if it does not. This is supposed to be used from a script that checks the validity of source regularily.
-rwxr-xr-xabuild.in11
1 files changed, 11 insertions, 0 deletions
diff --git a/abuild.in b/abuild.in
index 1a128b4..31ad046 100755
--- a/abuild.in
+++ b/abuild.in
@@ -170,6 +170,16 @@ md5check() {
cd "$srcdir" && echo "$md5sums" | md5sum -c
}
+# verify upstream sources
+sourcecheck() {
+ local s
+ for s in $source; do
+ if is_remote $s; then
+ wget -q -s $s || return 1
+ fi
+ done
+}
+
uri_fetch() {
local uri="$1"
local d="${uri##*/}" # $(basename $uri)
@@ -1182,6 +1192,7 @@ usage() {
echo " cleanpkg Remove already built binary and source package"
echo " cleancache Remove downloaded files from \$SRCDEST"
echo " srcpkg Make a source package"
+ echo " sourcecheck Check if remote source package exists upstream"
echo " up2date Compare target and sources dates"
echo " installdeps Install packages listed in makedepends and depends"
echo " uninstalldeps Uninstall packages listed in makedepends and depends"