From 7d7556e3afb934b69b99f7a7b1960c7be3d04be2 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 4 Jan 2014 22:27:52 -0500 Subject: librestage: stage files generated by librefetch --- src/abslibre-tools/librestage | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'src/abslibre-tools/librestage') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 6bbe80e..aa7f600 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -59,7 +59,8 @@ main() { # Load configuration load_files libretools check_vars libretools WORKDIR ARCHES || return 1 - load_files makepkg # for PKGDEST, which is optional + load_files makepkg # for PKGDEST and SRCDEST, which are optional + load_files librefetch # for MIRRORS, which is optional # Load the PKGBUILD load_PKGBUILD @@ -79,7 +80,7 @@ main() { pkgpath="$(readlink -f "$pkgpath")" fi - msg 'Found %s' "${pkgfile}" + msg 'Found package: %s' "${pkgfile}" canonical="" # is empty for the first iteration, set after that for repo in "${repos[@]}"; do @@ -101,10 +102,42 @@ main() { done done + for netfile in "${source[@]}"; do + for mirror in "${MIRRORS[@]}"; do + srcurl=${netfile#*::} + if [[ "$srcurl" == "$mirror"* ]]; then + if [[ $netfile = *::* ]]; then + srcname=${netfile%%::*} + else + srcname=${netfile##*/} + fi + + srcpath='' + for path in "./$srcname" "${SRCDEST:-.}/$srcname"; do + if [[ -f "path" ]]; then + srcpath="$path" + break + fi + done + if [[ -n "$srcpath" ]]; then + msg "Found generated source file: %s" "$srcname" + if cp "$srcpath" "${WORKDIR}/staging/other/${srcurl##"$mirror"}"; then + msg2 "%s staged on [%s]" "$srcname" other + staged=true + else + error "Can't put %s on [%s]" "$srcname" other + return 1 + fi + fi + break + fi + done + done + if $staged ; then return 0 else - error "No package was staged" + error "Nothing was staged" return 1 fi } -- cgit v1.2.3-2-g168b From 59633ede257e3ebbc81a55e191fee2e83400d477 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Jan 2014 20:58:57 -0500 Subject: librestage: fix staging generated sources --- src/abslibre-tools/librestage | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/abslibre-tools/librestage') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index aa7f600..96fee8b 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -114,14 +114,16 @@ main() { srcpath='' for path in "./$srcname" "${SRCDEST:-.}/$srcname"; do - if [[ -f "path" ]]; then + if [[ -f "$path" ]]; then srcpath="$path" break fi done if [[ -n "$srcpath" ]]; then msg "Found generated source file: %s" "$srcname" - if cp "$srcpath" "${WORKDIR}/staging/other/${srcurl##"$mirror"}"; then + dest="${WORKDIR}/staging/other/${srcurl##"$mirror"}" + mkdir -p -- "${dest%/*}" + if cp "$srcpath" "$dest"; then msg2 "%s staged on [%s]" "$srcname" other staged=true else -- cgit v1.2.3-2-g168b From b129824bfc9c5c85cadf98dfb724405d63dfc6c3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Mon, 20 Jan 2014 00:59:48 -0500 Subject: normalize to use >&2 instead of /dev/stderr --- src/abslibre-tools/librestage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/abslibre-tools/librestage') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 96fee8b..4ea6edc 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -42,12 +42,12 @@ main() { while getopts 'h' arg; do case $arg in h) usage; return 0;; - *) usage >/dev/stderr; return 1;; + *) usage >&2; return 1;; esac done repos=("$@") if [[ ${#repos[@]} -eq 0 ]]; then - usage >>/dev/stderr + usage >&2 return 1; fi -- cgit v1.2.3-2-g168b From ea11eca851e1b54e36d310f4d69e099f169191e8 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 00:05:22 -0500 Subject: I forgot to bump the copyright year on all the files I've touched this year --- src/abslibre-tools/librestage | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/abslibre-tools/librestage') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 4ea6edc..4a21133 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -3,7 +3,7 @@ # Prepares packages for upload # Copyright 2010-2011 Nicolás Reynolds -# Copyright 2013 Luke Shumaker +# Copyright 2013-2014 Luke Shumaker # # This file is part of Parabola. # -- cgit v1.2.3-2-g168b From c43f0808583070a22e904cd650e8ed17fe781806 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 2 Feb 2014 00:20:19 -0500 Subject: Normalize to use the string "Copyright (C)" --- src/abslibre-tools/librestage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/abslibre-tools/librestage') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 4a21133..610de50 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -2,8 +2,8 @@ # LibreStage # Prepares packages for upload -# Copyright 2010-2011 Nicolás Reynolds -# Copyright 2013-2014 Luke Shumaker +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker # # This file is part of Parabola. # -- cgit v1.2.3-2-g168b From d25f30f25ce61367c81133c9cd01fe3169d8f6c0 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Fri, 21 Mar 2014 14:39:06 -0400 Subject: Do an audit of copyright and license claims --- src/abslibre-tools/librestage | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/abslibre-tools/librestage') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 610de50..6ae0af0 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -2,8 +2,10 @@ # LibreStage # Prepares packages for upload -# Copyright (C) 2010-2011 Nicolás Reynolds -# Copyright (C) 2013-2014 Luke Shumaker +# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2013-2014 Luke Shumaker +# +# License: GNU GPLv3+ # # This file is part of Parabola. # -- cgit v1.2.3-2-g168b From c48ac8c89e596e160505bd5678db2b193607493f Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sat, 22 Mar 2014 22:00:44 -0400 Subject: Audit the authors and copyright years of files against git logs --- src/abslibre-tools/librestage | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/abslibre-tools/librestage') diff --git a/src/abslibre-tools/librestage b/src/abslibre-tools/librestage index 6ae0af0..1e208c9 100755 --- a/src/abslibre-tools/librestage +++ b/src/abslibre-tools/librestage @@ -2,7 +2,8 @@ # LibreStage # Prepares packages for upload -# Copyright (C) 2010-2011 Nicolás Reynolds +# Copyright (C) 2010-2012 Nicolás Reynolds +# Copyright (C) 2011 Joshua Ismael Haase Hernández (xihh) # Copyright (C) 2013-2014 Luke Shumaker # # License: GNU GPLv3+ -- cgit v1.2.3-2-g168b