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