From 06194a8691f50ffc9130795e16837496e13dd08f Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Sun, 31 Aug 2008 00:04:32 -0500 Subject: Move source generation to /home/ftp/sources Signed-off-by: Aaron Griffin --- misc-scripts/make-sourceball | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'misc-scripts/make-sourceball') diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index 71bb405..ea5ef49 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -5,19 +5,16 @@ if [ $# -ne 3 ]; then exit 1 fi -if [ -f "/etc/makepkg.conf" ]; then - #Get some config info - . /etc/makepkg.conf -else - echo "/etc/makepkg.conf does not exist!" - exit 1 -fi +. "$(dirname $0)/../db-functions" + +source_makepkg + packagename="$1" reponame="$2" arch="$3" ##### Arch specific stuff. TODO make this configurable ##### -srcpath="/home/aaron/public_html/sources/" +srcpath="/home/ftp/sources/" svnpath="file:///home/svn-packages/$packagename/" ############################################################ @@ -43,21 +40,19 @@ create_srcpackage() { if [ -d "$1" ]; then pushd "$1" >/dev/null . "$BUILDSCRIPT" - if ! /usr/bin/makepkg -gc >/dev/null 2>&1; then + if ! /usr/bin/makepkg --allsource >/dev/null 2>&1; then popd >/dev/null return 1 fi popd >/dev/null local pkg_file="${pkgname}-${pkgver}-${pkgrel}${SRCEXT}" - if ! /usr/bin/bsdtar -czf "$pkg_file" "$1"; then - return 2 - fi echo ":: Source package complete: $pkg_file" if [ ! -d "$srcpath" ]; then mkdir -p "$srcpath" fi + rm -f "$srcpath/${pkgname}-*-*${SRCEXT}" cp $pkg_file "$srcpath" return 0 @@ -65,7 +60,7 @@ create_srcpackage() { } trap ctrl_c 2 -trap cleanup 0 +trap cleanup 0 1 /bin/mkdir -p "$WORKDIR" cd "$WORKDIR" -- cgit v1.2.3-24-g4f1b