summaryrefslogtreecommitdiffstats
path: root/misc-scripts/make-sourceball
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-08-31 07:04:32 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2008-08-31 07:04:32 +0200
commit06194a8691f50ffc9130795e16837496e13dd08f (patch)
tree9e228b571aa2f275a98584514f18d7ee07a77bf7 /misc-scripts/make-sourceball
parentafc6b5b5977fe77e699af8f02f7c8c4c3df603de (diff)
downloaddbscripts-06194a8691f50ffc9130795e16837496e13dd08f.tar.gz
dbscripts-06194a8691f50ffc9130795e16837496e13dd08f.tar.xz
Move source generation to /home/ftp/sources
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'misc-scripts/make-sourceball')
-rwxr-xr-xmisc-scripts/make-sourceball21
1 files changed, 8 insertions, 13 deletions
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"