aboutsummarylogtreecommitdiffstats
path: root/build.sh
blob: 13df9f2e4aedee0ef60921a740ff297ffe0184bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

set -e

PKGVER=$1
REL=$2
VER=$PKGVER-$REL

EOL="$"

./fetch.sh $PKGVER $REL

shopt -s extglob

tar cvf $VER.tar.gz \
    larryshell/larryshell \
    larryshell/larryshellrc \
    larryshell/larryshell-errors.txt \
    larryshell/larryascii \
    larryshell/larry.cow

cp $VER.tar.gz /srv/http/larryshell

perl -pi -e "s/(pkgver=).*$EOL/\1'$PKGVER'/" PKGBUILD
perl -pi -e "s/(pkgrel=).*$EOL/\1'$REL'/" PKGBUILD
perl -pi -e "s/(md5sums=)\((.*)\)/\1('`md5sum $VER.tar.gz | cut -d " " -f1`')/" PKGBUILD
makepkg --printsrcinfo > .SRCINFO

# rm -rf -- src pkg *.tar* larryshell