11.1Sabs#!/bin/sh -e 21.1Sabs# Simple helper script for updating 31.1Sabs 41.1Sabsgithubdir=https://github.com/rvalles/device-streams 51.1Sabsif [ $# = 0 ] ; then 61.1Sabs cat <<END 71.1SabsUsage: update version 81.1Sabs 91.1SabsWhere version is a release from $githubdir 101.1Sabse.g.: "./update 2.2.1" 111.1Sabs 121.1SabsAssumes you are using an https capable ftp, and have lha installed from pkgsrc 131.1SabsEND 141.1Sabs exit 1 151.1Sabsfi 161.1Sabs 171.1Sabsversion=$1 181.1Sabsshift 191.1Sabs 201.1Sabssrctar=device-streams-$version-src.tar.gz 211.1Sabsftp -o $srctar $githubdir/archive/refs/tags/$version.tar.gz 221.1Sabsuuencode $srctar $srctar > $srctar.uue 231.1Sabsrm $srctar 241.1Sabs 251.1Sabsexelha=device-streams-$version.lha 261.1Sabsftp -o $exelha $githubdir/releases/download/$version/device-streams.lha 271.1Sabsuuencode $exelha $exelha > $exelha.uue 281.1Sabslha xf $exelha 291.1Sabsfor exe in rdbinfo xdevtostream xstreamtodev ; do 301.1Sabs uuencode devstreams/$exe $exe > $exe.uue 311.1Sabs rm devstreams/$exe 321.1Sabsdone 331.1Sabsmv devstreams/README.md device-streams.README.md 341.1Sabs# Explicitly remove each known file, so any new unknown files trigger error 351.1Sabsrm devstreams/COPYING devstreams/devtostream devstreams/streamtodev 361.1Sabsrmdir devstreams 371.1Sabsrm $exelha 381.1Sabs 391.1Sabsecho 401.1Sabsecho "- Check Makefile for $srctar and $exelha" 411.1Sabsecho "- Cvs add the new $srctar and $exelha and remove the old" 42