Ken Robinson's picture

I have been out of the loop for the last 8 months or so, and my TKLDev VM is a bit dated, wanted to know what else besides the below I already did to get my tool chain ready for dev time.

# apt-get update
# apt-get upgrade

# cd /turnkey
# rm -R fab

# /usr/local/sbin/tkldev-setup

I saw something about removing the sandbox, but I don't remeber when or why. Also the tagged in common, I assume is to build products from a specfic release, whereas the common master branch is current v14.2ish?

Thanks much!

Forum: 
Jeremy Davis's picture

Although I would be wary of just rm-ing /turnkey/fab unless you are sure that there are no appliances in a partially built state. It can sometimes cause dramas. Perhaps what might be better would be to clean the products sub directories prior to removal. There are many different ways that could be done, but here is one that should be relatively obvious what it's doing and reasonably safe:
cd /turnkey/fab/products
clean_dir () {
    cd $DIR
    make clean
    ERR="$?"
    cd ..
#   [ "$ERR" == "0" ] && rm -r $DIR
}
for DIR in */; do clean_dir; done
Obviously I commented out the rm line to make sure no one just copy pastes it somewhere without understanding what it will do (it will remove all sub-directories in which "make clean" completes successfully).

Alternatively, you could adjust the tkldev-setup script to clean everything up for you properly without removing anything. E.g. run make clean on each products repo, commit any uncommitted changes; check out the master branch and re-pull from TurnKey (or where-ever the master repo is for appliances not yet in the library)...

Ken Robinson's picture

The goal was a "fresh" TKLDev box. I did not have anything to keep. I do however like your idea of adjusting the tkldev-setup script to clean things up. I think I'll make a tkldev-cleanup script that will run make clean, then archive anything in the products folder, then re-download all the bits that make up TKLDev. Again the idea is a clean slate thats up-to-date.

Regards,

Ken  
":0)

http://www.github.com/DocCyblade

Jeremy Davis's picture

If you have nothing to keep and just want an up to date and clean TKLDev, a clean install may be a good option?

I actually have a few scripts I use, but they're pretty dirty. I have hoped/planned to tidy them up and publish them but I never seem to get back to that...

Add new comment