Add a .lwbuildrc system.

This commit is contained in:
Laurence Withers 2006-07-25 18:41:03 +01:00
parent becb94e1d4
commit 78116d06dd
1 changed files with 17 additions and 1 deletions

View File

@ -36,6 +36,19 @@ DEST_DIR="${DEST_DIR}/${P}"
# Ensure that we have our .lwbuildrc set up correctly.
LWBUILDRC=~/.lwbuildrc
if [ ! -e ${LWBUILDRC} ]
then
echo "You don't have a ${LWBUILDRC}, so I'll create a blank one for you."
do_cmd cp skel-.lwbuildrc ${LWBUILDRC}
echo "Edit this file, and then re-run the build process."
exit 1
fi
do_cmd src ${LWBUILDRC} || exit 1
# Copy to destination directory. Deal with the case where the user has
# specified the name of the resulting directory, and the case where the
# user simply specified where the directory should be created.
@ -56,11 +69,11 @@ mv project.kdevelop.filelist ${P}.kdevelop.filelist
# Substitute all relevant variables in files
echo " Substituting variables in files"
AUTHOR="$(grep ^$(whoami): /etc/passwd | cut -d: -f 5)"
YEAR="$(date +%Y)"
do_cmd find . -type f -exec sed \
-e "s,@P@,${P},g" \
-e "s,@AUTHOR@,${AUTHOR},g" \
-e "s,@EMAIL@,${EMAIL},g"
-e "s,@YEAR@,${YEAR},g" \
-i {} \; || exit 1
@ -71,3 +84,6 @@ echo
echo " ======== TODO list ========"
find . -type f -a -not -path './scripts/build.*' -exec grep -Hrn @TODO@ {} \;
print_success "Done"
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
# vim: expandtab:ts=4:sw=4