diff --git a/Tools/Scripts/share/get_files b/Tools/Scripts/share/get_files index 554bbaaaf5a31b232f618cdb3a6fbd79ec1303d7..55d7d03af68a24524b0ac538434e210018c88029 100755 --- a/Tools/Scripts/share/get_files +++ b/Tools/Scripts/share/get_files @@ -34,6 +34,7 @@ Usage: get_files [options] [file_list] [options] [file_list] ... -data : get data files from DATAPATH -scripts : get scripts from PATH -xmls : get XML files form XMLPATH + -python : get python files from PYTHONPATH -copy : switch to copying files [default] -symlink : switch to symlinking files -keep : keep existing files, do not overwrite [default] @@ -64,7 +65,7 @@ get_one_file() { # Lookup one file according to current options. file=$1 if [ -z "$options" ]; then - options="jo data scripts xmls" + options="jo data scripts xmls python" echo "Warning: get_files without '-jo|-data|-scripts|-xmls' is SLOW !" fi # echo "get_one_file: file $file; options=$options" @@ -73,6 +74,8 @@ get_one_file() { for opt in $options; do if [ "$opt" == "jo" ]; then path_opt="./ ${JOBOPTSEARCHPATH//:/ }" + elif [ "$opt" == "python" ]; then + path_opt="./ ${PYTHONPATH//:/ }" elif [ "$opt" == "data" ]; then path_opt=${DATAPATH//:/ } elif [ "$opt" == "scripts" ]; then @@ -92,8 +95,7 @@ get_one_file() { for dir in ${path_opt}; do if [ -d $dir ]; then - find $dir -mindepth 1 -maxdepth 2 -path "*/${file}" | \ - egrep -v '~|CVS' >>${tempfile} + find $dir -mindepth 1 -maxdepth 2 -path "*/${file}" >> ${tempfile} if [ -s ${tempfile} ]; then status="FOUND"; fi if [[ -n "$status" && -z "$do_warn" ]]; then break; fi fi @@ -183,6 +185,7 @@ for f in $*; do -data) options=data;; -scripts) options=scripts;; -xmls) options=xmls;; + -python) options=python;; -copy) do_copy=yes; copycmd=${basic_copycmd};; -symlink) do_copy=; copycmd=${basic_linkcmd};; -keep) do_keep=yes;;