Spinroot

A forum for Spin users

You are not logged in.

#1 2013-04-09 01:46:22

spinroot
forum
Registered: 2010-11-18
Posts: 619
Website

Checking for new versions

Here's a small shell script to mechanically check if you have the latest version of Spin.
Adjust as needed to fit your local system. This version requires 'curl' to be installed, and runs on Linux systems:

#!/usr/bin/tclsh8.5

set RM        rm
set SPIN    spin
set TMP        tryfile

proc version_check {url f} {
    global SPIN

    # without the user-agent argument it fails
    catch { exec curl --user-agent "Mozilla/4.0" -o $f $url }

    set hv ""
    catch { set hv [exec $SPIN -V] }
    if {$hv != ""} {
        set dd [string first " --" $hv]
        set fp [string range $hv 0 [expr $dd - 1]]
        set lp [string range $hv [expr $dd + 4] end]
        set hv "$fp \($lp\)"
    } else {
        set hv "No Spin Version is currently installed"
    }
    puts "Installed: $hv"

    set fd [open $f r]
    while {[gets $fd line] > -1} {
        set want [string first "Current Version" $line]
        if {$want >= 0} {
            set ln [expr $want + [string length "Current Version "]]
            set el [string first ":" $line]
            puts "Available: Spin Version [string range $line $ln [expr $el - 1]]"
            break
    }    }
    puts "Download from: http://spinroot.com/spin/Src or ../Bin"
    close $fd
}

version_check http://spinroot.com/spin/Src/index.html $TMP
exec $RM $TMP

exit

Offline

#2 2017-08-14 07:19:13

Neko
Member
Registered: 2011-04-22
Posts: 3

Re: Checking for new versions

Now it is not working: the result HTML page it the 
"One more step
Please complete the security check to access spinroot.com
...
"
page with "I'm not a robot" checkbox.

Offline

#3 2017-08-14 16:21:10

spinroot
forum
Registered: 2010-11-18
Posts: 619
Website

Re: Checking for new versions

sorry about that.  that's we webhosting company's doing.
can't do much about that myself

Offline

Board footer

Powered by FluxBB