22 Nov
2009
22 Nov
'09
9:39 p.m.
This works only if there are only files in that directory. Subfolders are not copied. So one has to run "install" for each folder. "cp" copies everything - files and folders.
--
I wrote a function to handle that at some point which I include in PKGBUILDs on very rare occasions: function _install_dir { _src_dir=$1 _dest_dir=$2 _n=${#_src_dir} for _file in $(find $_src_dir -type f) do _dest_file=${_dest_dir}${_file:$_n} install -Dm644 $_file $_dest_file done } Obviously it could be modified to accept a permissions argument as well. Xyne