7 - なるべく`bash`のビルドインコマンドを使用する
8 - 外部コマンドを使用する場合は依存パッケージを追加する(極力使用しないでください)
12 - エラーメッセージは全て`STDERR`に出力する
13 - メッセージ用の関数がある場合はその関数を使用する
14 - 最小限の出力とし、冗長な出力は引数で有効化された場合のみに許可する
19 - 引数の多いコマンド(`xorriso`など)やパイプを多用する場合は`\`で改行する
20 - コードにTodoを書く場合は日付とユーザー名を書く
24 - 全ての関数に概要や使い方にコメントを書く
25 - 関数の定義は`function`を付けず、`my_func () {}`を使用する
26 - 全ての変数は`${hoge}`のように括弧を使用する
27 - 関数内でしか使用しない変数は必ず`local`で宣言する
28 - コマンド置き換えは`` `echo hoge` ``ではなく`$(echo hoge)`を使用する
29 - 算術式展開は`$(( m + n ))`を使用する
30 - ローカル変数、関数は名前を`_`から始める
32 ### if、for、test、case、while
34 - `test`コマンドは必ず`[[`を使用する
35 - `do`や`then`などは`while`、`for`、`if`と同じ行に書く
36 - `case`の際はなるべくインデントを揃える
41 # Usage: test_hoge <str>
44 if [[ "${var}" = "hoge" ]]; then
48 echo "${var} is not hoge"
61 Issueを送る際は以下の情報を記述して下さい。
63 - インストールに使用したイメージファイルへのURL
67 - ビルドに問題が発生した際は作業ディレクトリにある`build_options`
71 日本語もしくは英語で内容を書いて下さい。内容とは具体的に以下のものを指します。
73 - どのような機能を追加するか(問題を修正するのか)
74 - 現在確認されている問題(その対処方法も書ければ)
80 # How to Contribute - English-
86 - Use the `bash` build-in command if possible
87 - Add a dependency package if you use an external command (please try not to use it as much as possible)
91 - Output all error messages to `STDERR`
92 - If you have a function for messages, use that function
93 - Minimize output and redundant output only allow when enabled by the argument
97 - Indent should be four spaces
98 - The line break with `\` when using a lot of commands with many arguments (`xorriso`, etc.) or a lot of pipes
99 - If you write a Todo in your code, write the date and user name
101 ### Variables and functions
103 - Write comments on all functions in summary and usage
104 - The function definition does not use a `function` but uses `my_func () {}`
105 - All variables use brackets like `${hoge}`
106 - Declare variables that are used only in the function by `local`
107 - Command substitution does not use a `` `echo hoge` `` but uses `$(echo hoge)`
108 - Arithmetic expansion uses `$(( m + n ))`
109 - Local variables, functions start their names with `_`
111 ### if, for, test, case, while
113 - The `test` command must use `[[`
114 - `do`, `then`, etc. write on the same line as `while`, `for` and `if`
115 - Align indents on `cases` as much as possible
120 # Usage: test_hoge <str>
123 if [[ "${var}" = "hoge" ]]; then
124 echo "${var} is hoge"
127 echo "${var} is not hoge"
135 - Use as few relative paths as possible.
136 - Make sure to enclose the file path in `""`.
140 When you send the issue, please include the following information.
142 - The URL to the image file used for the installation
143 - The environment in which the problem occurred
145 - Screenshots, logs, etc.
146 - If a problem happens when you're building, Please attach the file `build_options` in the working directory
150 Please write content in either Japanese or English. Specifically, the content refers to the following
152 - What features you are going to add (or fix the problem)
153 - Known issues (and how to deal with them if you can write about them)
154 - About the references
155 - Tested environment and development environment