Add a .lwbuildrc system.
This commit is contained in:
parent
becb94e1d4
commit
78116d06dd
18
install.sh
18
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
|
# Copy to destination directory. Deal with the case where the user has
|
||||||
# specified the name of the resulting directory, and the case where the
|
# specified the name of the resulting directory, and the case where the
|
||||||
# user simply specified where the directory should be created.
|
# 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
|
# Substitute all relevant variables in files
|
||||||
echo " Substituting variables in files"
|
echo " Substituting variables in files"
|
||||||
AUTHOR="$(grep ^$(whoami): /etc/passwd | cut -d: -f 5)"
|
|
||||||
YEAR="$(date +%Y)"
|
YEAR="$(date +%Y)"
|
||||||
do_cmd find . -type f -exec sed \
|
do_cmd find . -type f -exec sed \
|
||||||
-e "s,@P@,${P},g" \
|
-e "s,@P@,${P},g" \
|
||||||
-e "s,@AUTHOR@,${AUTHOR},g" \
|
-e "s,@AUTHOR@,${AUTHOR},g" \
|
||||||
|
-e "s,@EMAIL@,${EMAIL},g"
|
||||||
-e "s,@YEAR@,${YEAR},g" \
|
-e "s,@YEAR@,${YEAR},g" \
|
||||||
-i {} \; || exit 1
|
-i {} \; || exit 1
|
||||||
|
|
||||||
|
@ -71,3 +84,6 @@ echo
|
||||||
echo " ======== TODO list ========"
|
echo " ======== TODO list ========"
|
||||||
find . -type f -a -not -path './scripts/build.*' -exec grep -Hrn @TODO@ {} \;
|
find . -type f -a -not -path './scripts/build.*' -exec grep -Hrn @TODO@ {} \;
|
||||||
print_success "Done"
|
print_success "Done"
|
||||||
|
|
||||||
|
# kate: replace-trailing-space-save true; space-indent true; tab-width 4;
|
||||||
|
# vim: expandtab:ts=4:sw=4
|
||||||
|
|
Loading…
Reference in New Issue