WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: microcore update  (Read 2857 times)

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
microcore update
« on: November 21, 2009, 07:11:28 PM »
Code: [Select]
#!/bin/sh
#updates microcore placing bzimage and  microcore.gz in the tce dir
# version 0.5
#argument: -r (release) -c (release candidate)
#jls_legalize (unsenepopiu@tin.it)

. /etc/init.d/tc-functions
PROG_NAME=$(basename $0)

abort(){
echo "Usage: $PROG_NAME [ -r -c ]"
echo "-r for release -c for release candidate"
exit 2
}

case $1 in
-r) FTPDIR="release/distribution_files" ;;
-c) FTPDIR="release_candidates/distribution_files" ;;
*) abort ;;
esac
[ -s /opt/.tcrc ] || exit 1
MIRROR="$(awk '/Mirror/ {print $2}' /opt/.tcrc)"
cd `cat /opt/.tce_dir`
busybox wget ftp://${MIRROR}/${FTPDIR}/bzImage -O bzImage
busybox wget ftp://${MIRROR}/${FTPDIR}/bzImage.md5.txt -O bzImage.md5.txt
busybox md5sum -cs bzImage.md5.txt
if [ $? != 0 ]; then
echo "md5 doesn't match"
exit 1
fi
busybox wget ftp://${MIRROR}/${FTPDIR}/microcore.gz -O microcore.gz
busybox wget ftp://${MIRROR}/${FTPDIR}/microcore.gz.md5.txt -O microcore.gz.md5.txt
busybox md5sum -cs microcore.gz.md5.txt
if [ $? != 0 ]; then
echo "md5 doesn't match"
exit 1
fi
echo "Done!"
exit 0
« Last Edit: November 27, 2009, 10:02:46 AM by jls_legalize »
dCore user

Offline jls

  • Hero Member
  • *****
  • Posts: 2135
Re: microcore update
« Reply #1 on: November 27, 2009, 10:03:35 AM »
microcore and the kernel have to be in the tce dir
dCore user