#!/bin/bash

cd ~/Code/TomatoSource_1_23
pwd

tar -xzf WRT54GL_v4.30.11_11_US.tgz
mv WRT54GL-US_v4.30.11_11 tomato
cd tomato/release/src/

pwd

rm -r et
rm -r et.4702
rm -r wl
rm -r rts
rm -r tools
rm .model
cd router
rm -r busybox
rm -r cron
rm -r dnsmasq
rm -r httpd
rm -r iproute2
rm -r iptables
rm -r ipupdate
rm -r lib
rm -r libnet
rm -r libpcap
rm -r mipsel-uclibc
rm -r misc
rm -r nas
rm -r netconf
rm -r ntpclient
rm -r nvram
rm -r others
rm -r rc
rm -r ses
rm -r shared
rm -r traceroute
rm -r udhcpd
rm -r upnp
rm -r utils
rm -r www

#read -p "Press any key…"

cd ~/Code/TomatoSource_1_23
#bunzip2 TomatoSource_1_23.tar.bz2
tar -xf TomatoSource_1_23.tar

#read -p "Press any key…"

tar -xf tomato.tar

#read -p "Press any key…"

# toolkit already installed
cd tomato/release/src

#gedit ~/Code/TomatoSource_1_23/tomato/release/src/router/shared/tomato_profile.h
#cp -f ~/Code/TomatoSource_1_23/Makefile ./Makefile

#read -p "Press any key…"

#export PATH=$(PATH):/opt/brcm/hndtools-mipsel-uclibc/bin:/opt/brcm/hndtools-mipsel-linux/bin
make

