#!/bin/bash # 2009 Copyright Yejun Yang (yejunx AT gmail DOT com) # Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. # http://creativecommons.org/licenses/by-nc-sa/3.0/us/ ARCH=$(uname -m) if [[ $ARCH != x86_64 ]]; then ARCH=i686 fi URL=http://YOURWEBSERVER/ if [ -e /var/chroot/mini_${ARCH} ]; then echo "**** /var/chroot/mini_${ARCH} already exists. " echo "**** You have to remove previous deployment." exit 1 fi mkdir -p /var/chroot cd /var/chroot echo "Start downloading ${URL}mini_${ARCH}.cpio.lzma , be patient ..." wget -q -O - ${URL}mini_${ARCH}.cpio.lzma | lzma -d | cpio -idv deploy_success () { cat <