Closed wyze closed 8 years ago
Updated based on @johnnyman727's comment here: https://github.com/tessel/t2-cli/pull/733#issuecomment-218372775
It looks good to me. This is being super pedantic but I think it would be a little bit cleaner if it didn't fetch the mac address until within the if statement (otherwise it fetches each update for no reason).
Your choice whether to change that. Then, if it passes a smoke test on your T2, feel free to merge!
Nice!
Moved the fetching of the MAC address inside the if block. Smoke test looks good still. :)
~/Downloads 32s
❯ t2 rename Tester
INFO Looking for your Tessel...
INFO Connected to Tessel-02A30510B2C5.
INFO Changed name of device Tessel-02A30510B2C5 to Tester
~/Downloads 6s
❯ t2 list
INFO Searching for nearby Tessels...
USB Tester
LAN Tester
~/Downloads 6s
❯ t2 update --openwrt-path openwrt-4.4.3.bin
INFO Looking for your Tessel...
INFO Connected to Tester.
INFO Updating OpenWRT (1/2)
INFO Transferring image of size 19.14 MB. This will take 2-4 minutes...
INFO Transfer complete.
INFO Starting OpenWRT update.
INFO Please do not remove power from Tessel.
INFO This process will take at least two minutes...
INFO Configuration is saved during update.
WARN No firmware binary loaded... skipping firmware update
INFO Finished updating Tessel with local builds.
~/Downloads 3m 27s
❯ t2 list
INFO Searching for nearby Tessels...
USB Tester
LAN Tester
~/Downloads 6s
❯ t2 update --openwrt-path openwrt-4.4.3.bin -n
INFO Looking for your Tessel...
INFO Connected to Tester.
INFO Updating OpenWRT (1/2)
INFO Transferring image of size 19.14 MB. This will take 2-4 minutes...
INFO Transfer complete.
INFO Starting OpenWRT update.
INFO Please do not remove power from Tessel.
INFO This process will take at least two minutes...
INFO Configuration is not saved during update.
WARN No firmware binary loaded... skipping firmware update
INFO Finished updating Tessel with local builds.
~/Downloads 3m 28s
❯ t2 list
INFO Searching for nearby Tessels...
USB Tessel-02A30510B2C5
This is half of the piece of puzzle for #19.
PR for the other half of the puzzle is over here: https://github.com/tessel/t2-cli/pull/733