3 if [ "$#" -ne 2 ]; then
4 echo "This script creates project files for Qt Creator to develop Haiku with."
5 echo "It should only be used on a per-project basis, as Qt Creator is too slow"
6 echo "when used on all of Haiku at once."
8 echo "THIS SCRIPT *MUST* BE RUN FROM THE REPOSITORY ROOT."
10 echo "Usage: <script> <project name> <path to project root>"
11 echo "e.g: create_project_file.sh Tracker src/kits/tracker/"
15 DIR
="$( cd "$
( dirname "${BASH_SOURCE[0]}" )" && pwd )"
19 printf "// Add predefined macros for your project here. For example:\n// #define THE_ANSWER 42\n" \
21 printf "[General]\n" >$DIR/$NAME.creator
23 # Build lists of files
24 find $ROOTDIR -type f |
sed "s@^@../../@" >$DIR/$NAME.files
25 find $ROOTDIR -type d |
sed "s@^@../../@" >$DIR/$NAME.includes
26 find headers
-type d |
sed "s@^@../../@" >>$DIR/$NAME.includes
27 echo "Done. Project file: $DIR/$NAME.creator"