|
| 1 | +# The contribution guidelines |
| 2 | + |
| 3 | +Hey!, Thanks for contributing to this project. if you are in this step that means you're probably want to contribute to this project or just exploring :). |
| 4 | + |
| 5 | +This page will guide you through the project structure and basic rules ( that keep project structure clean and understandable ) |
| 6 | + |
| 7 | +> this repo main script is referenced as **udroid** in this page. |
| 8 | +
|
| 9 | +## Directories |
| 10 | + |
| 11 | +```cmd |
| 12 | +. |
| 13 | +├── CODE_OF_CONDUCT.md |
| 14 | +├── CONTRIBUTING.md |
| 15 | +├── dist.json |
| 16 | +├── etc |
| 17 | +├── install.sh |
| 18 | +├── LICENSE |
| 19 | +├── README.md |
| 20 | +├── targ.map |
| 21 | +├── udroid |
| 22 | +└── version |
| 23 | +``` |
| 24 | + |
| 25 | +All mainline code related to udroid will be stored in **udroid** directory. and the rest of em are either archiving or documentation. on expanding the **udroid** directory you'll two direcotries **src** and **test**. |
| 26 | + |
| 27 | +> By name src for the source code & test for the test code. |
| 28 | +
|
| 29 | +## How udroid works |
| 30 | + |
| 31 | +udroid in this repo is a script to manage things like installing, login of a tarball. |
| 32 | + |
| 33 | +the main script is in `udroid/src/udroid.sh`. which will be executed when user executes `udroid` in terminal. |
| 34 | + |
| 35 | +Basic things udroid supposed to handle are: |
| 36 | + |
| 37 | +1. **install**: to dowload & install the linux tarball |
| 38 | +2. **login**: to login to the linux filesystem by chaning root with the help of `proot` |
| 39 | +3. **remove**: to remove the linux tarball installation |
| 40 | + |
| 41 | +> if you ever tried `proot-distro` you'll get the idea of how udroid works. |
| 42 | +> Additional functionality will like **backup** and **restore** need more work (If you have any ideas feel free to suggest us!). |
| 43 | +
|
| 44 | +## Dev FAQ? |
| 45 | + |
| 46 | +### How this sript differ from `proot-distro`? |
| 47 | + |
| 48 | +> the main for this project is to provide a simple script to install and use linux distros on android. and the main difference is that udroid is a single script which is easy to understand and modify. from the developer point of view now we can ship new feature faster without patching things to work specially with `proot-distro`. with this users can be able to install custom linux distro with ease. |
| 49 | +
|
| 50 | +### What languages are used in this project? |
| 51 | + |
| 52 | +> the main script is written in `bash` and the test script (some of em) is written in `python` & `bash` (because it's easy to write test in python). |
| 53 | +
|
| 54 | +### What to contribute? |
| 55 | + |
| 56 | +> you can contribute by writing documentation, writing diffrent test cases, new features, creating issues about bugs. even a typo fix is a contribution. You can ping us on discord if you have any questions. |
| 57 | +
|
| 58 | +### is the project accept Hacktoberfest PRs? |
| 59 | + |
| 60 | +> Yes, we accept Hacktoberfest PRs. but we'll only accept PRs that are related to the project. if you have any questions ping us on discord. |
| 61 | +
|
| 62 | +### How can I contribute? |
| 63 | + |
| 64 | +for starters, you can follow the basic GitHub guide [here](https://docs.github.com/en/get-started/quickstart/hello-world). |
| 65 | + |
| 66 | +When submitting a pull request make sure to add a good title and description to it. using images is encouraged too |
| 67 | + |
| 68 | +Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this: |
| 69 | + |
| 70 | +```cmd |
| 71 | +$ git commit -m "A summary of the commit |
| 72 | +> |
| 73 | +> A paragraph describing what changed and its impact." |
| 74 | +``` |
| 75 | + |
| 76 | +## Coding conventions |
| 77 | + |
| 78 | +Start reading our code and you'll get the hang of it. We optimize for readability: |
| 79 | + |
| 80 | +- use 4-6 spaces for intending to bash |
| 81 | +- strictly use `lf` for line ending |
| 82 | +- check the code with `shellcheck` or `pylint` before commiting. |
| 83 | +- follow directory rules in all cases ( images should go in directories named similar to `assets` or `img` ) |
| 84 | +- use code beautification tools for better look and readability |
| 85 | +- This is open-source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers, the goal is to make the ride as smooth as possible. |
0 commit comments