diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-02-11 17:40:36 +0100 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-02-11 17:43:27 +0100 |
commit | 90f27119e2d266e96f09c241d7cc84a72974d11d (patch) | |
tree | 5502efdfc3aecf9955bd71fb8849ff23608a124f | |
parent | a5eb44ed1bbdf2eabd26cc02932898719375c230 (diff) | |
download | dbscripts-90f27119e2d266e96f09c241d7cc84a72974d11d.tar.gz dbscripts-90f27119e2d266e96f09c241d7cc84a72974d11d.tar.xz |
Emit makepkg --allsource to a logfile
One log file per package, in /var/log/sourceballs for easier
lookup and reference.
Log file is removed if the command succeeds, and gzipped on failure
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-x | misc-scripts/make-sourceball | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index cdbd697..f45eba8 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -18,6 +18,7 @@ reponame="$2" arch="$3" srcpath="$FTP_BASE/sources/" +logpath="/var/log/sourceballs/" WORKDIR="/tmp/make-sourceball.$packagename.$UID" @@ -65,11 +66,13 @@ create_srcpackage() { cleanup 0 fi - if ! /usr/bin/makepkg --allsource >/dev/null 2>&1; then + if ! /usr/bin/makepkg --allsource >"$logpath/$pkgname" 2>&1; then popd >/dev/null + /bin/gzip -9 "$logpath/$pkgname" die "\tFailed to download source for $pkgname-$pkgver-$pkgrel ($reponame-$arch)" fi popd >/dev/null + /bin/rm "$logpath/$pkgname" local pkg_file="${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" @@ -94,6 +97,7 @@ trap cleanup 0 1 set_umask /bin/mkdir -p "$WORKDIR" +/bin/mkdir -p "$logpath" cd "$WORKDIR" if /usr/bin/svn export -q "$SVN_PATH/$packagename/repos/$reponame-$arch" $packagename; then |