#! /bin/sh
#Script getrepo, get a complete repository of optware

startpoint=$(pwd)
#define a different name evry time when script is called
vartime=$(date +"%y_%m_%d_%H_%M")
store_to=/tmp/harddisk/repository
mkdir $store_to
chmod 755 $store_to
mkdir $store_to/$vartime
chmod 755 $store_to/$vartime

cd $store_to/$vartime
#call wget with r 1 option
wget -r 1 -t 0 http://ipkg2.nslu2-linux.org/feeds/optware/oleg/cross/stable &
cd $startpoint

