From 78116d06dd3e1b7e991e68b9e0e6d593af306a55 Mon Sep 17 00:00:00 2001 From: Laurence Withers Date: Tue, 25 Jul 2006 18:41:03 +0100 Subject: [PATCH] Add a .lwbuildrc system. --- install.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index affaf2a..908c84c 100755 --- a/install.sh +++ b/install.sh @@ -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