Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- rm -rf app
- mkdir -p app app/activities app/worktrees app/components
- declare -a components=("_main" "lib1" "lib2" "lib3")
- for component in ${components[@]}; do
- mkdir -p app/components/$component
- cd app/components/$component
- git init
- echo "$component text file\n" > ${component}_file.txt
- cd -
- done;
- exclude_git="-I 'refs' -I objects -I info -I logs -I index " \
- "-I packed-refs -I hooks -I FETCH_HEAD -I branches -I config -I description"
- clear
- echo $exclude_git
- tree -a $exclude_git -I 'refs' -I 'objects' -I 'info' -I 'log's -I index \
- -I packed-refs -I hooks -I FETCH_HEAD -I HEAD -I branches -I config -I description
- output:
- .
- ├── app
- │ ├── activities
- │ ├── components
- │ │ ├── lib1
- │ │ │ ├── .git
- │ │ │ └── lib1_file.txt
- │ │ ├── lib2
- │ │ │ ├── .git
- │ │ │ └── lib2_file.txt
- │ │ ├── lib3
- │ │ │ ├── .git
- │ │ │ └── lib3_file.txt
- │ │ └── _main
- │ │ ├── .git
- │ │ └── _main_file.txt
- │ └── worktrees
- ├── example
- ├── .git
- ├── LICENSE
- ├── README.md
- └── tree.gitignore
- 14 directories, 8 files
- pac1@Spinnaker:/work/trees/git_stuff$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement