[SCRIPT] CLI update auto-download and flash latest beta

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Contributions Upload
Author Message
osm0sis
DD-WRT Novice


Joined: 28 Jul 2021
Posts: 11
Location: Canada

PostPosted: Thu Aug 05, 2021 1:03    Post subject: [SCRIPT] CLI update auto-download and flash latest beta Reply with quote
Worked out a little script to paste into telnet to make CLI updates a bit easier:
Code:

cliupdate() {
  local build_latest ddwrt firmware n platform year;
  ddwrt=http://download1.dd-wrt.com/dd-wrtv2/downloads/betas;
  year=2021;
  build_latest=$(wget -qO- $ddwrt/$year | grep href | tail -n1 | cut -d\" -f2);
  platform=tplink_archer-c7-v4;
  firmware=tplink_archer-c7-v4.bin;
  read -p "Download and flash DD-WRT \"$build_latest\" (y/n)? " n;
  case $n in
    Y|y)
      rm -f /tmp/$firmware;
      wget -P /tmp $ddwrt/$year/$build_latest$platform/$firmware \
        && write /tmp/$firmware linux;
    ;;
  esac;
  if [ $? -eq 0 ]; then
    read -p "Reboot (y/n)? " n;
    case $n in
      Y|y) reboot;;
    esac;
  fi;
}

cliupdate;


I have it set up for my TP-Link Archer C7 v4, but simply change out the platform= and firmware= values for your device and you should be set!

Enjoy! Cool
Sponsor
RobrPatty
DD-WRT Novice


Joined: 06 Jun 2016
Posts: 23

PostPosted: Mon Nov 29, 2021 8:41    Post subject: where in telenet Reply with quote
Not sure where to paste this script.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 3245

PostPosted: Mon Nov 29, 2021 10:08    Post subject: Reply with quote
https://www.chiark.greenend.org.uk/~sgtatham/putty/

Telnet, or SSH if configured, router IP username root.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum