summaryrefslogtreecommitdiffstats
path: root/misc-scripts/make-sourceball
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-05-27 20:23:24 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2008-05-27 20:23:24 +0200
commit966c53e8ce0b11b9cd7fb88a497f2c086c682676 (patch)
treeda62e9b6505553c1a0fee6e50f898697d3d9924a /misc-scripts/make-sourceball
parent11279e5f6a29d1b1d8061ab69deab0f4a977b891 (diff)
downloaddbscripts-966c53e8ce0b11b9cd7fb88a497f2c086c682676.tar.gz
dbscripts-966c53e8ce0b11b9cd7fb88a497f2c086c682676.tar.xz
Minor changes to the make-sourceball script
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'misc-scripts/make-sourceball')
-rwxr-xr-xmisc-scripts/make-sourceball19
1 files changed, 14 insertions, 5 deletions
diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball
index c4eb459..e9e2152 100755
--- a/misc-scripts/make-sourceball
+++ b/misc-scripts/make-sourceball
@@ -18,7 +18,7 @@ arch="$3"
##### Arch specific stuff. TODO make this configurable #####
srcpath="/home/aaron/public_html/sources/"
-svnpath="file:///home/svn-packages/$packagename/repos/$reponame-$arch"
+svnpath="file:///home/svn-packages/$packagename/"
############################################################
WORKDIR="/tmp/make-sourceball.$svnrepo.$UID"
@@ -97,11 +97,20 @@ cd "$WORKDIR"
echo "Creating Source tarball for $packagename ($reponame-$arch)"
-if /usr/bin/svn checkout -N $svnpath; then
+if /usr/bin/svn checkout -N "$svnpath/repos/$reponame-$arch"; then
cd "$reponame-$arch"
- echo "Cheating with makepkg to download sources"
- /usr/bin/makepkg -g || die "Error downloading files"
- create_srcpackage
+ if /usr/bin/makepkg -g; then
+ create_srcpackage
+ else #try the trunk, it may have updates to the source URL
+ if /usr/bin/svn checkout -N "$svnpath/trunk"; then
+ cd "trunk"
+ if /usr/bin/makepkg -g; then
+ create_srcpackage
+ else
+ die "Cannot get sources properly. Dying"
+ fi
+ fi
+ fi
else
die "Package '$packagename' does not exist in repo $reponame-$arch"
fi