Skip to content

Commit 90396a3

Browse files
authored
Merge pull request #25 from darrylbalderas/shell-script
Implement shell script for creating folder structure for new programming languages
2 parents e4c2b2f + 793c2b2 commit 90396a3

File tree

2 files changed

+46
-11
lines changed

2 files changed

+46
-11
lines changed

README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,36 @@
11
# data-and-algorithms
22
Let's go over data structures and algorithms together!
3-
We will use Cracking the Coding Interview as reference.
43

5-
Feel free to add your solutions in your channel of your choice 😃
4+
We will use [Cracking the Coding Interview Book](http://www.crackingthecodinginterview.com/) as reference.
65

6+
Feel free to add your solutions in your programming language of your choice 😃
77

8-
Directions:
9-
* Fork this repo
10-
* Work on your fork
11-
* When you want to submit a solution, make a pr
12-
* To pull down the most recent changes on this repo, make this branch your upstream
138

14-
Check out [Noé Lomelí](https://github.com/noelomeli)'s video for visual directions https://www.youtube.com/watch?v=sv97x3yPbrw
9+
Run the following script to create the directory structure for your programming language
10+
if one is not already created
1511

16-
Follow along with the community on the #data-and-algorithms channel on our Slack
17-
Make sure to also check out our #python #ruby #javascript and #golang channels while you're there
12+
`bash createDirectories.sh <Programming Language>`
1813

19-
If you haven't joined yet, request an invite here: techqueria.org/slack
14+
## Contributing
15+
---
16+
17+
> To get started...
18+
19+
1. 🍴 [Fork](https://github.com/techqueria/data-and-algorithms#fork-destination-box) this repository
20+
21+
2. 🔨 Commit your changes to your forked repo
22+
23+
3. 🎉 Open a new [pull request](https://github.com/techqueria/data-and-algorithms/compare) with changes from your forked repo and get it approved!
24+
* To pull down the most recent changes on this repo, make this branch your upstream
25+
26+
Check out [Noé Lomelí](https://github.com/noelomeli)'s video for [visual directions](https://www.youtube.com/watch?v=sv97x3yPbrw)
27+
28+
29+
## Join Slack Channel
30+
---
31+
32+
Request an invite here: [techqueria.org/slack](https://techqueria.org/communities/slack/)
33+
34+
Follow along with the community on the `#data-and-algorithms` channel on our Slack
35+
36+
Make sure to also check out our `#python` `#ruby` `#javascript` and `#golang` channels while you're there

createDirectories.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
DIRECTORY="$(git rev-parse --show-toplevel)"
4+
5+
if [[ $# -lt 1 ]]; then
6+
echo "Usage: bash createDirectories.sh <programming language>" >&2
7+
exit 1
8+
fi
9+
10+
programmingLanguage="$1"
11+
rsync --archive --include='*/' --exclude='*' "${DIRECTORY}/Python/" \
12+
"${DIRECTORY}/${programmingLanguage}/"
13+
14+
15+
find "${DIRECTORY}/${programmingLanguage}/" -mindepth 2 -maxdepth 2 \
16+
-exec touch -- "{}/empty.txt" \;
17+
18+
git add "${DIRECTORY}/${programmingLanguage}/"

0 commit comments

Comments
 (0)