Language translations now possible!
#!/bin/ashBOOTDIR="/mnt/hda3/tinycore2/boot/"MIRROR="$(awk '/Mirror/ {print $2}' /opt/.tcrc)"### Select Release or Release Candidate echo "Enter r or c (release or candidate)" read RELEASEcase $RELEASE in "r" ) FTPDIR="${MIRROR}/release/" ;; "c" ) FTPDIR="${MIRROR}/release_candidates/" ;; * ) echo "invalid option" ; exit 1 ;; esac####### View Directory ######if [ `which netrik` ]; then netrik "http://${FTPDIR}" echo "continue? 'y' " read RESPONSE [ ${RESPONSE} == "y" ] || exit 1fi ####### Download and Check Release #########[ -e /tmp/download ] || sudo mkdir /tmp/downloadcd /tmp/download sudo wget ftp://${FTPDIR}tinycore*CHECK="$(md5sum -c *.md5.txt)" if [ `echo $CHECK | awk '{print $2}'` != "OK" ]; then echo "md5 doesn't match" exit 1 fi ##### Extract #########[ -e /tmp/extract ] || sudo mkdir /tmp/extract sudo mount *.iso /tmp/extract -o loop,ro ######### Backup present release cd ${BOOTDIR}[ -e tinycore.gz ] && sudo mv tinycore.gz tinycore.gz.old########### Copy new release to boot dirctory #######sudo cp /tmp/extract/boot/tinycore.gz ${BOOTDIR} ############ Cleanup ##########sudo umount /tmp/extractsudo rmdir /tmp/extractsudo rm -R /tmp/download echo "Done!"exit 0
#!/bin/sh#### upgrade tc, jpeters###modified by jls_legalize#### version 0.3###first argument: release numeber ###second argument boot dir###third argument (optional) 2nd boot dirif [ ! -n "$2" ]; then echo "Usage: tc-upgrade release_numb dir1 [dir2]" echo "Example: tc-upgrade 2.4rc1 /mnt/hda4/boot" echo "Example: tc-upgrade 2.4rc1 /mnt/hda4/boot /mnt/sda1/boot" exit 1fi######## Set Path to tinycore.gz ##########MIRROR="$(awk '/Mirror/ {print $2}' /opt/.tcrc)"### Select Release or Release Candidate RELEASE=`echo $1 | grep rc`if [ "$RELEASE" == "" ]; then FTPDIR="${MIRROR}/release/"else FTPDIR="${MIRROR}/release_candidates/"fiTMPDIR=`mktemp -d`echo $TMPDIR####### Download and Check Release #########echo ftp://${FTPDIR}tinycore_"$1".isobusybox wget ftp://${FTPDIR}/tinycore_"$1".iso -O $TMPDIR/tinycore_"$1".isobusybox wget ftp://${FTPDIR}/tinycore_"$1".iso.md5.txt -O $TMPDIR/tinycore_"$1".iso.md5.txtcd $TMPDIRbusybox md5sum -cs $TMPDIR/tinycore_"$1".iso.md5.txtif [ $? != 0 ]; then echo "md5 doesn't match" rm -rf $TMPDIR exit 1 fi mkdir $TMPDIR/mntsudo mount -o loop tinycore_"$1".iso $TMPDIR/mnt########### Copy new release to boot dirctory(es) #######cp -f $TMPDIR/mnt/boot/tinycore.gz $2 cp -f $TMPDIR/mnt/boot/bzImage $2if [ -n "$3" ]; then sudo cp -f $TMPDIR/mnt/boot/bzImage $3 sudo cp -f $TMPDIR/mnt/boot/tinycore.gz $3fisudo umount $TMPDIR/mntrm -rf $TMPDIRecho "Done!"exit 0
A microcore version would, I assume, ideally update Xprogs, Xtools, and [I forget the name of the last one] if necessary, as well.