#!/bin/sh SOURCEDIR=/home/Mud20/testsite SRCDEST=/home/Mud20/src AREDEST=/home/Mud20/area_current CFILES=${SOURCEDIR}/src/*.c HFILES=${SOURCEDIR}/src/*.h OFILES=${SOURCEDIR}/src/*.o AREFILES=${SOURCEDIR}/area_current/* if [[ "${@}" = "" ]] then echo "usage: update.sh [-all] | [[-src] | [-are]]" exit fi for i in ${@} do if [[ ${i} = -src || ${i} = -all ]] then echo "updating source files." rsync -avub ${CFILES} ${SRCDEST} rsync -avub ${HFILES} ${SRCDEST} rsync -avub ${OFILES} ${SRCDEST} rsync -avub /home/Mud20/testsite/src/VERSION /home/Mud20/src ./compile echo "Compile complete, if succesfull you can now reboot." fi if [[ ${i} = -are || ${i} = -all ]] then echo "updating areafiles..." rsync -avuzb ${AREFILES} ${AREDEST} echo "update succesfull, you can now do a copyover!" fi if [[ ${i} = -help ]] then echo "usage: update.sh [-all] | [[-src] | [-are]]" fi done