#! /bin/sh # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42) # wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a beer in return. Anton Berezin # ---------------------------------------------------------------------------- # # Version 0.1 # if [ $# != 2 ]; then echo "Usage:" echo " build_mtree where suffix" exit 1 fi WHERE=$1 SUFFIX=$2 JAILFILE="/home/tobez/.mtree/mtree.local.${SUFFIX}" if [ -d "${WHERE}" ]; then mtree -c -i -x -p "${WHERE}/usr/local" -k flags,gid,mode,nlink,uid,link >"${JAILFILE}" else echo "${WHERE} must be a directory" exit 2 fi