Changeset 43632 in vbox for trunk/tools/bin
- Timestamp:
- Oct 12, 2012 12:11:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/bin/gen-slickedit-workspace.sh
r43401 r43632 66 66 MY_WINDOWS_HOST="" 67 67 MY_OPT_MINIMAL="" 68 MY_OPT_USE_WILDCARDS="yes" 68 69 69 70 #MY_KBUILD_PATH="${KBUILD_PATH}" … … 113 114 # @param $1 The output file name base. 114 115 # @param $2 The file name. 116 # @param $3 Optional folder override. 115 117 my_file() 116 118 { … … 128 130 129 131 # by extension. 130 *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h )132 *.c|*.cpp|*.m|*.mm|*.pl|*.py|*.as|*.c.h|*.cpp.h|*.java) 131 133 MY_FOLDER="$1-Sources.lst" 132 134 ;; … … 144 146 ;; 145 147 esac 148 if test -n "$3"; 149 then 150 MY_FOLDER="$1-$3.lst" 151 fi 146 152 147 153 ## @todo only files which are in subversion. … … 153 159 154 160 ## 161 # Generate file entry for the specified file if it was found to be of interest. 162 # 163 # @param $1 The output file name base. 164 # @param $2 The wildcard spec. 165 my_wildcard() 166 { 167 EXCLUDES="*.log;*.kup;*~;*.pyc;*.exe;*.sys;*.dll;*.o;*.obj;*.lib;*.a;*.ko;*.class;.svn/*" 168 echo ' <F N="'"${2}"'/*" Recurse="1" Excludes="'"${EXCLUDES}"'"/>' >> "$1-All.lst" 169 } 170 171 ## 155 172 # Generate file entries for the specified sub-directory tree. 156 173 # 157 174 # @param $1 The output filename. 158 175 # @param $2 The sub-directory. 176 # @param $3 Optional folder override. 159 177 my_sub_tree() 160 178 { … … 173 191 if test -d "${f}"; 174 192 then 175 my_sub_tree "${1}" "${f}" 193 my_sub_tree "${1}" "${f}" "${3}" 176 194 else 177 my_file "${1}" "${f}" 195 my_file "${1}" "${f}" "${3}" 178 196 fi 179 197 done … … 193 211 194 212 # Zap existing file collections. 213 > "${MY_FILE}-All.lst" 195 214 > "${MY_FILE}-Sources.lst" 196 215 > "${MY_FILE}-Headers.lst" … … 206 225 if test -d "${f}"; 207 226 then 208 my_sub_tree "${MY_FILE}" "${f}" 227 if test -z "${MY_OPT_USE_WILDCARDS}"; 228 then 229 my_sub_tree "${MY_FILE}" "${f}" 230 else 231 case "${f}" in 232 ${MY_ROOT_DIR}/include*) 233 my_sub_tree "${MY_FILE}" "${f}" "Headers" 234 ;; 235 *) my_wildcard "${MY_FILE}" "${f}" 236 ;; 237 esac 238 fi 209 239 else 210 240 my_file "${MY_FILE}" "${f}" … … 215 245 216 246 # Generate the folders. 247 if test -s "${MY_FILE}-All.lst"; 248 then 249 ${MY_SORT} "${MY_FILE}-All.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 250 fi 217 251 if test -s "${MY_FILE}-Sources.lst"; 218 252 then … … 223 257 if test -s "${MY_FILE}-Headers.lst"; 224 258 then 225 echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}" 259 if test -z "${MY_OPT_USE_WILDCARDS}"; 260 then 261 echo ' <Folder Name="Headers" Filters="*.h;*.hpp">' >> "${MY_FILE}" 262 else 263 echo ' <Folder Name="Headers" Filters="">' >> "${MY_FILE}" 264 fi 226 265 ${MY_SORT} "${MY_FILE}-Headers.lst" | ${MY_SED} -e 's/<!-- sortkey: [^>]*>/ /' >> "${MY_FILE}" 227 266 echo ' </Folder>' >> "${MY_FILE}" … … 247 286 248 287 # Cleanup 249 ${MY_RM} "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst" 288 ${MY_RM} "${MY_FILE}-All.lst" "${MY_FILE}-Sources.lst" "${MY_FILE}-Headers.lst" "${MY_FILE}-Assembly.lst" \ 289 "${MY_FILE}-Testcases.lst" "${MY_FILE}-Others.lst" 250 290 } 251 291
Note:
See TracChangeset
for help on using the changeset viewer.