github.com/schwarzm/garden-linux@v0.0.0-20150507151835-33bca2147c47/old/linux_backend/bin/create.sh (about) 1 #!/bin/bash 2 3 [ -n "$DEBUG" ] && set -o xtrace 4 set -o xtrace 5 set -o nounset 6 set -o errexit 7 shopt -s nullglob 8 9 cd $(dirname "${0}")/.. 10 11 if [ $# -ne 1 ]; then 12 echo "Usage: ${0} <instance_path>" 13 exit 1 14 fi 15 16 target=${1} 17 18 if [ ! -d ${target} ]; then 19 echo "\"${target}\" does not exist, aborting..." 20 exit 1 21 fi 22 23 cp -r skeleton/* "${target}"/. 24 unshare -m "${target}"/setup.sh 25 echo ${target}