DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.
#

if {#} != 1
	echo "CopyExports requires 1 parameters:"
	echo "Parameter 1: path relative to {SourceRootDir} of the file which contains"
	echo "             the list of files to be copied, one per line.  This path"
	echo "             may not begin with a colon"
	echo
	Exit 1
end if


Set SourceList "{SourceRootDir}{1}"

Set ScriptsDir "{SourceRootDir}mozilla:build:mac:"

#set sourceList "{SourceRootDir}mozilla:{1}"

if {verbose}
	echo "Source list is in file ś"{SourceList}ś""
	echo "Scripts directory is ś"{ScriptsDir}ś""
end if

# for each line in the source file, remove it if it starts with #, otherwise quote it

for curLine in `streamedit "{sourceList}" -e '/Ľ#Ĺ/ Delete; /Ľ/ Replace /(Ĺ)¨1/ "ś""¨1"ś""'`
	
	echo "{curLine}"
	
	# ignore empty lines
	if `evaluate "{{curLine}}" != ""`
		
		echo "{curLine}"
		
		# strip out trailing comments
		if `evaluate "{curLine}" =~ /(Ĺ)¨1[ śt]+(#Ĺ)¨2/`
			set sourceLine "{¨1}"
			# echo "Discarding comment {¨2}"
		else
			set sourceLine "{curLine}"
		end if
		
		if `evaluate "{sourceLine}" =~ /([Â śt]+)¨1[ śt]+[:]*(Ĺ)¨2/`
		
			if {verbose}
				echo "Cur line is {sourceLine}"
			end if
		
			set exportFile "{¨1}"
			set theTarget "{¨2}"
			
			if {verbose}
				echo "Export file name is {exportFile}"
				echo "Target directory is {theTarget}"
			end if
			
			"{ScriptsDir}CopyList.script" "{exportFile}" "{theTarget}"
		
		end if
	
	end if

end for