A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/CyberShadow/DustMite/wiki/Clean-DMD-imports below:

Clean DMD imports · CyberShadow/DustMite Wiki · GitHub

Skip to content Navigation Menu Search code, repositories, users, issues, pull requests...

Saved searches Use saved searches to filter your results more quickly

Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert

Vladimir Panteleev edited this page

May 6, 2016

·

1 revision
#!/bin/bash
set -eu

rm -rf src-clean-imports
cp -a src src-clean-imports

for F in $(find src-clean-imports -name '*.d')
do
	echo "// DustMiteNoRemoveStart" > "$F".tmp
	while IFS= read -r LINE
	do
		if [[ "$LINE" =~ ^import\ .*\;$ ]]
		then
			echo "// DustMiteNoRemoveStop"
		fi
		echo "$LINE"
		if [[ "$LINE" =~ import\ .*\;$ ]]
		then
			echo "// DustMiteNoRemoveStart"
		fi

		#echo "Line: $LINE"
	done < "$F" >> "$F".tmp
	echo "// DustMiteNoRemoveStop" >> "$F".tmp
	mv "$F.tmp" "$F"
done

( cd src-clean-imports && make -f posix.mak clean ; find -name '*.o' -delete )

dustmite --split '*.d:lines' src-clean-imports 'make -f posix.mak check'

#dmd -o- -J. $(find -name '*.d')
#access.d aggregate.d aliasthis.d apply.d argtypes.d arrayop.d arraytypes.d attrib.d builtin.d canthrow.d clone.d complex.d cond.d constfold.d cppmangle.d ctfeexpr.d dcast.d dclass.d declaration.d delegatize.d denum.d dimport.d dinifile.d dinterpret.d dmacro.d dmangle.d dmodule.d doc.d dscope.d dstruct.d dsymbol.d dtemplate.d dversion.d entity.d errors.d escape.d expression.d func.d globals.d hdrgen.d id.d identifier.d impcnvtab.d imphint.d init.d inline.d intrange.d json.d lexer.d lib.d link.d mars.d mtype.d nogc.d nspace.d opover.d optimize.d parse.d sapply.d sideeffect.d statement.d staticassert.d target.d tokens.d traits.d utf.d visitor.d typinf.d objc_stubs.d libelf.d scanelf.d backend.d irstate.d toelfdebug.d toctype.d gluelayer.d root/aav.d root/array.d root/file.d root/filename.d root/longdouble.d root/man.d root/outbuffer.d root/port.d root/response.d root/rmem.d root/rootobject.d root/speller.d root/stringtable.d newdelete.o glue.a backend.a

for F in $(find src-clean-imports.reduced -name '*.d')
do
	grep -vF DustMiteNoRemove "$F" > "$F".tmp
	mv "$F.tmp" "$F"
done

( cd src-clean-imports.reduced && find -name '*.d' -exec mv '{}' '../src/{}' ';' )

rm -rf src-clean-imports src-clean-imports.reduced

Toggle table of contents Pages 15

Clone this wiki locally

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4