Created
June 1, 2018 08:27
-
-
Save jpluimers/da2b68eb615234cbc9488645f3f8943f to your computer and use it in GitHub Desktop.
Check Delphi .dproj against files on disk by Attila Kovacs originally from https://pastebin.com/fcsiLc6Q
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# !!! Be careful with scripts, always do your backup or play on a copy !!! | |
if [[ $# -eq 0 ]] ; then | |
echo 'usage: prfiles.sh project.dproj' | |
exit 1 | |
fi | |
declare file_content=$( cat $1 | sed -nr "/DCCReference Include/I{s/(.*)\"(.*)\"(.*)/\2/g;p}" ) | |
shopt -s nocasematch | |
for i in `find . -name "*.pas" -type f -printf '%f\n'`; do | |
[[ ! " $file_content " =~ $i ]] && echo $i "not in dproj" | |
done | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment