| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | # |
| 3 | # fstrcmp - fuzzy string compare library |
| 4 | # Copyright (C) 2012 Peter Miller |
| 5 | # Written by Peter Miller <[email protected]> |
| 6 | # |
| 7 | # This program is free software; you can redistribute it and/or modify |
| 8 | # it under the terms of the GNU General Public License as published by |
| 9 | # the Free Software Foundation; either version 3 of the License, or (at |
| 10 | # your option) any later version. |
| 11 | # |
| 12 | # This program is distributed in the hope that it will be useful, |
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 15 | # General Public License for more details. |
| 16 | # |
| 17 | # You should have received a copy of the GNU General Public License along |
| 18 | # with this program. If not, see <http://www.gnu.org/licenses/>. |
| 19 | # |
| 20 | set -e |
| 21 | |
| 22 | project=fstrcmp |
| 23 | wwwdir=web-site |
| 24 | |
| 25 | AEGIS_PROJECT=${project}.cur |
| 26 | export AEGIS_PROJECT |
| 27 | |
| 28 | RELEASES="$@" |
| 29 | testscip-shell system . . test. -z "$RELEASES" && RELEASES="lucid precise" |
| 30 | |
| 31 | PPA=ppa:pmiller-opensource/ppa |
| 32 | |
| 33 | #find the project baseline |
| 34 | bl=`aegis -cd -bl` |
| 35 | dir=$bl/$wwwdir |
| 36 | f=`( cd $dir && lsscip-shell system . . ls. *.tar.gz ) | tailscip-shell system . . tail. -1` |
| 37 | if [scip-shell system . . `[`. -z "$f" ] |
| 38 | then |
| 39 | echoscip-shell system . . echo. "can't find tarball" 1>&2 |
| 40 | exit 1 |
| 41 | fi |
| 42 | tgz=$dir/$f |
| 43 | |
| 44 | tdir=/tmp/${project}-ppa-$$ |
| 45 | |
| 46 | for release in $RELEASES |
| 47 | do |
| 48 | cd /tmpscip-shell filesystem . . `/tmp`. |
| 49 | rmscip-shell system . . rm. -rf $tdir |
| 50 | mkdirscip-shell system . . mkdir. $tdir |
| 51 | cd $tdir |
| 52 | tarscip-shell system . . tar. xzf $tgz |
| 53 | cd ${project}-* |
| 54 | |
| 55 | PACKAGE=`headscip-shell system . . head. -1 debian/changelog | awkscip-shell system . . awk. '{print $1}'` |
| 56 | VERSION=`headscip-shell system . . head. -1 debian/changelog | awkscip-shell system . . awk. '{print $2}' | |
| 57 | sedscip-shell system . . sed. -r -e 's/^\(//;s/\)$//'` |
| 58 | |
| 59 | sedscip-shell system . . sed. -i -r -e "1s/\) [^;]+; /~pm~${release}) ${release}; /" debian/changelog |
| 60 | headscip-shell system . . head. -1 debian/changelog |
| 61 | dpkg-buildpackagescip-shell system . . dpkg-buildpackage. -S -sa |
| 62 | lsscip-shell system . . ls. -lho .. |
| 63 | dput $PPA ../${PACKAGE}_${VERSION}~pm~${release}_source.changes |
| 64 | |
| 65 | cd /tmpscip-shell filesystem . . `/tmp`. |
| 66 | rmscip-shell system . . rm. -rf $tdir |
| 67 | done |
| 68 | exit 0 |
| 69 | # vim: set ts=8 sw=4 et : |