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