Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 1 | #!/bin/bash |
Joey Armstrong | fedf45e | 2023-09-20 11:40:01 -0400 | [diff] [blame^] | 2 | ## ----------------------------------------------------------------------- |
| 3 | ## Intent: This script ca |
| 4 | ## ----------------------------------------------------------------------- |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 5 | |
| 6 | set -euo pipefail |
| 7 | |
Joey Armstrong | fedf45e | 2023-09-20 11:40:01 -0400 | [diff] [blame^] | 8 | [[ -d makefiles ]] || { echo "ERROR: makefiles/ not found"; exit 1; } |
| 9 | |
| 10 | # git rm -fr makefiles |
| 11 | |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 12 | mkdir -p makefiles |
| 13 | pushd makefiles || { echo "ERROR: pushd makefiles failed"; exit 1; } |
| 14 | |
Joey Armstrong | fedf45e | 2023-09-20 11:40:01 -0400 | [diff] [blame^] | 15 | echo '** Adding repo:onf-make (library makefiles) as a submodule' |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 16 | git submodule add 'https://github.com/opencord/onf-make.git' onf-lib |
| 17 | |
Joey Armstrong | fedf45e | 2023-09-20 11:40:01 -0400 | [diff] [blame^] | 18 | echo '** Ignore local onf-make edits' |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 19 | echo 'onf-lib' >> .gitignore |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 20 | |
| 21 | cp ../makefiles_include_mk.ex include.mk |
| 22 | |
Joey Armstrong | fedf45e | 2023-09-20 11:40:01 -0400 | [diff] [blame^] | 23 | echo '** Create project specific directory makefiles/local' |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 24 | mkdir -p local |
| 25 | touch local/include.mk |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 26 | |
| 27 | popd || { echo "ERROR: popd makefiles failed"; exit 1; } |
| 28 | |
Joey Armstrong | fedf45e | 2023-09-20 11:40:01 -0400 | [diff] [blame^] | 29 | if false; then |
| 30 | git add makefiles/.gitignore |
| 31 | git add makefiles/include.mk |
| 32 | git add makefiles/local/include.mk |
| 33 | |
| 34 | # git add makefiles |
| 35 | |
Joey Armstrong | f128de8 | 2023-09-08 17:05:18 -0400 | [diff] [blame] | 36 | # [EOF] |