diff --git a/boxctl.sh b/boxctl.sh index 2bc1a86..70a1e66 100755 --- a/boxctl.sh +++ b/boxctl.sh @@ -170,14 +170,17 @@ V=$(expand_v) if [ -f ./files ]; then msg 0 "installing $(wc -l files | awk '{print $1 " " $2}')" for file in $(cat files); do - local _src _dest _mode _owner _group + local _src _dest _mode _owner _group _dir read _src _owner _group _mode _dest < ${_dest}" + msg 2 "\t\tmkdir -p ${_dir}" msg 2 "\t\tchown ${_owner}:${_group} $_dest" msg 2 "\t\tchmod ${_mode} $_dest" + _ssh ${RUN_USER}@${SERVER} "mkdir -p ${_dir}" _scp $_src "${RUN_USER}@${SERVER}:$_dest" _ssh ${RUN_USER}@${SERVER} "/sbin/chown ${_owner}:${_group} \ $_dest; /bin/chmod ${_mode} $_dest"