1 1.1 abs #!/bin/sh -e 2 1.1 abs # Simple helper script for updating 3 1.1 abs 4 1.1 abs githubdir=https://github.com/rvalles/device-streams 5 1.1 abs if [ $# = 0 ] ; then 6 1.1 abs cat <<END 7 1.1 abs Usage: update version 8 1.1 abs 9 1.1 abs Where version is a release from $githubdir 10 1.1 abs e.g.: "./update 2.2.1" 11 1.1 abs 12 1.1 abs Assumes you are using an https capable ftp, and have lha installed from pkgsrc 13 1.1 abs END 14 1.1 abs exit 1 15 1.1 abs fi 16 1.1 abs 17 1.1 abs version=$1 18 1.1 abs shift 19 1.1 abs 20 1.1 abs srctar=device-streams-$version-src.tar.gz 21 1.1 abs ftp -o $srctar $githubdir/archive/refs/tags/$version.tar.gz 22 1.1 abs uuencode $srctar $srctar > $srctar.uue 23 1.1 abs rm $srctar 24 1.1 abs 25 1.1 abs exelha=device-streams-$version.lha 26 1.1 abs ftp -o $exelha $githubdir/releases/download/$version/device-streams.lha 27 1.1 abs uuencode $exelha $exelha > $exelha.uue 28 1.1 abs lha xf $exelha 29 1.1 abs for exe in rdbinfo xdevtostream xstreamtodev ; do 30 1.1 abs uuencode devstreams/$exe $exe > $exe.uue 31 1.1 abs rm devstreams/$exe 32 1.1 abs done 33 1.1 abs mv devstreams/README.md device-streams.README.md 34 1.1 abs # Explicitly remove each known file, so any new unknown files trigger error 35 1.1 abs rm devstreams/COPYING devstreams/devtostream devstreams/streamtodev 36 1.1 abs rmdir devstreams 37 1.1 abs rm $exelha 38 1.1 abs 39 1.1 abs echo 40 1.1 abs echo "- Check Makefile for $srctar and $exelha" 41 1.1 abs echo "- Cvs add the new $srctar and $exelha and remove the old" 42