diff options
Diffstat (limited to 'misc-scripts/make-sourceball')
-rwxr-xr-x | misc-scripts/make-sourceball | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/misc-scripts/make-sourceball b/misc-scripts/make-sourceball index 221d0ce..661f481 100755 --- a/misc-scripts/make-sourceball +++ b/misc-scripts/make-sourceball @@ -24,28 +24,26 @@ script_lock create_srcpackage() { if [ -d "$1" ]; then pushd "$1" >/dev/null - pkgver=$(. PKGBUILD; echo ${pkgver}) - pkgrel=$(. PKGBUILD; echo ${pkgrel}) - license=($(. PKGBUILD; echo ${license[@]})) - if ! [ $FORCE == 1 ] && ! chk_license ${license[@]} ; then - #Removed so as not to clutter failed.txt + pkgver=$(. PKGBUILD; echo ${pkgver}) + pkgrel=$(. PKGBUILD; echo ${pkgrel}) + license=($(. PKGBUILD; echo ${license[@]})) + if ! [ $FORCE == 1 ] && ! chk_license ${license[@]} ; then + # Removed so as not to clutter failed.txt #warning "$packagename license (${license[@]}) does not require source tarballs" cleanup 0 else msg "Creating source tarball for $packagename-$pkgver-$pkgrel" fi - local logfile="${LOGDIR}/sourceballs/$packagename" - if ! /usr/bin/makepkg --allsource --ignorearch >"$logfile" 2>&1; then - popd >/dev/null - /bin/gzip -f -9 "$logfile" + local logfile="${LOGDIR}/sourceballs/$packagename.gz" + if ! /usr/bin/makepkg --allsource --ignorearch 2>&1 | gzip >"$logfile"; then die "Failed to download source for $packagename-$pkgver-$pkgrel ($reponame-$arch)" fi - /bin/rm -f "$logfile"{,.gz} + /bin/rm -f "$logfile" local pkg_file="${packagename}-${pkgver}-${pkgrel}${SRCEXT}" - cp "$pkg_file" "${FTP_BASE}/${SRCPOOL}" + mv "$pkg_file" "${FTP_BASE}/${SRCPOOL}" popd >/dev/null @@ -57,18 +55,10 @@ set_umask [ ! -d "${LOGDIR}/sourceballs" ] && mkdir -p "${LOGDIR}/sourceballs" cd "$WORKDIR" -if [[ "$reponame" = "community" || "$reponame" = "community-testing" ]]; then - if /usr/bin/svn export -q "$SVNREPOCOMMUNITY/$packagename" $packagename; then - create_srcpackage "$packagename/repos/$reponame-$arch" - else - die "Package '$packagename' does not exist in repo '$reponame-$arch'" - fi +if /usr/bin/svn export -q "$SVNREPO/$packagename" $packagename; then + create_srcpackage "$packagename/repos/$reponame-$arch" else - if /usr/bin/svn export -q "$SVNREPO/$packagename" $packagename; then - create_srcpackage "$packagename/repos/$reponame-$arch" - else - die "Package '$packagename' does not exist in repo '$reponame-$arch'" - fi + die "Package '$packagename' does not exist in repo '$reponame-$arch'" fi script_unlock |