Last active
December 22, 2015 12:48
-
-
Save nak3/6474449 to your computer and use it in GitHub Desktop.
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/sh | |
# file name | |
AllFileInOneFile="allfileinonefile.xxx" | |
test -e ${AllFileInOneFile} && rm ${AllFileInOneFile} | |
echo "--- file list ---" >> ${AllFileInOneFile} | |
find . -type f -name '*.cpp' -or -name '*.hpp' >> ${AllFileInOneFile} | |
echo "----------------" >> ${AllFileInOneFile} | |
for filepath in `find . -type f -name '*.cpp' -or -name '*.hpp'` | |
do | |
if [ ${filepath} = "$0" ] | |
then | |
continue | |
fi | |
echo "================================================== " >> ${AllFileInOneFile} | |
echo ${filepath} >> ${AllFileInOneFile} | |
echo "================================================== " >> ${AllFileInOneFile} | |
echo " " >> ${AllFileInOneFile} | |
cat ${filepath} >> ${AllFileInOneFile} | |
echo " " >> ${AllFileInOneFile} | |
echo " --- END ${filepath}" --- >> ${AllFileInOneFile} | |
echo " " >> ${AllFileInOneFile} | |
done | |
echo "Complete ... Please Enter or some key" | |
read wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment