summaryrefslogtreecommitdiff
path: root/distrib/amiga/stand/update
blob: 99fc5ffe2423308b779a9d11423e25c2ba02a72b (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
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh -e
# Simple helper script for updating

githubdir=https://github.com/rvalles/device-streams
if [ $# = 0 ] ; then
    cat <<END
Usage: update version

Where version is a release from $githubdir
e.g.: "./update 2.2.1"

Assumes you are using an https capable ftp, and have lha installed from pkgsrc
END
    exit 1
fi

version=$1
shift

srctar=device-streams-$version-src.tar.gz
ftp -o $srctar $githubdir/archive/refs/tags/$version.tar.gz
uuencode $srctar $srctar > $srctar.uue
rm $srctar

exelha=device-streams-$version.lha
ftp -o $exelha $githubdir/releases/download/$version/device-streams.lha
uuencode $exelha $exelha > $exelha.uue
lha xf $exelha
for exe in rdbinfo xdevtostream xstreamtodev ; do
   uuencode devstreams/$exe $exe > $exe.uue
   rm devstreams/$exe
done
mv devstreams/README.md device-streams.README.md
# Explicitly remove each known file, so any new unknown files trigger error
rm devstreams/COPYING devstreams/devtostream devstreams/streamtodev
rmdir devstreams
rm $exelha

echo
echo "- Check Makefile for $srctar and $exelha"
echo "- Cvs add the new $srctar and $exelha and remove the old"