You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
command -v git-lfs >/dev/null 2>&1|| { echo>&2"\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-checkout.\n";exit 2; }
command -v git-lfs >/dev/null 2>&1|| { echo>&2"\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-commit.\n";exit 2; }
command -v git-lfs >/dev/null 2>&1|| { echo>&2"\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/post-merge.\n";exit 2; }
command -v git-lfs >/dev/null 2>&1|| { echo>&2"\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting .git/hooks/pre-push.\n";exit 2; }
@@ -107,6 +107,41 @@ cd32379 UPDATED: A table of contents have been added to README.md (Axlfc)
107
107
e40bfe3 FIXED: Bug in clonerepository installation type. There was an rm missing for avoiding collisions (AleixMT)
108
108
```
109
109
110
+
## Git Large File-System support
111
+
We are using git-lfs to track binary data on our repository like data from images which do not need to be indexed as
112
+
a normal file in git. Instead, we use git-lfs, a utility to upload binary files to git in a more optimized way, so it
113
+
does not conflict with our pull, push, checkout and clone speeds.
114
+
115
+
First you need to install git-lfs in your computer. You can use the customizer for this matter if you already have it installed:
116
+
```
117
+
sudo apt-get install -y git-lfs
118
+
```
119
+
or
120
+
```
121
+
sudo customizer-install -v -o git
122
+
```
123
+
124
+
Then, every time you clone the repository, you need to navigate to the project folder and execute:
125
+
```
126
+
git-lfs install
127
+
```
128
+
You will see sentences similar to these:
129
+
```
130
+
Updated git hooks.
131
+
Git LFS initialized.
132
+
```
133
+
134
+
Now you can work transparently and uploading binary content. The rules for `git-lfs` to distinguish between indexable
135
+
files (source code) and no-indexable files (binary data) are in the `.gitattributes` file in the root of the project.
136
+
You can include rules there to mark as no-indexable file any type of files regarding its name (and extension). For example:
137
+
```
138
+
*.svg filter=lfs diff=lfs merge=lfs -text
139
+
*.png filter=lfs diff=lfs merge=lfs -text
140
+
```
141
+
142
+
Which are two rules that make all the files with `.svg` and `.png` extension trackable by git-lfs. These rules are already
143
+
in the repository.
144
+
110
145
## Semantic versioning
111
146
112
147
We do use semantic versioning as defined in [here](https://semver.org/).
@@ -119,64 +154,100 @@ PATCH version when you make backwards compatible bug fixes.
119
154
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
120
155
121
156
157
+
## Git hooks
158
+
Commits on develop branch and master branch are forbidden. Merge in develop and master branch hasve to be forcibly with the option --no-ff
159
+
122
160
# Business Rules
123
161
These are a set of rules that are used to build the installation of each feature in the customizer environment to
124
162
maximize the usability and fanciness of each of them and the different capabilities and subsystems available.
125
163
126
164
###### Environmental
127
-
-[x] Both behaviors of the script use the file `~/.config/user-dirs.dirs` to set some language-independent environment variables (for example, to get an independent system-language path to the Desktop), so some functions of this script will fail if this file does not exist. The variables declared in this file that are used in the customizer are `XDG_DESKTOP_DIR=/home/username/Desktop`, `XDG_PICTURES_DIR=/home/username/Images`, `XDG_TEMPLATES_DIR=/home/username/Templates`.
128
-
-[x] Customizer must not rely ever on the working directory, that is why relative paths are completely avoided (only allowed in necessary cases in . In the same vein, files must not be downloaded in the working directory, they should be deleted in a controlled location. In most cases, this location is `BIN_FOLDER`.
165
+
-[x] Both behaviors of the script use the file `~/.config/user-dirs.dirs` to set some language-independent environment
166
+
variables (for example, to get an independent system-language path to the Desktop), so some functions of this script
167
+
will fail if this file does not exist. The variables declared in this file that are used in the customizer are
168
+
`XDG_DESKTOP_DIR=/home/username/Desktop`,
169
+
`XDG_PICTURES_DIR=/home/username/Images`,
170
+
`XDG_TEMPLATES_DIR=/home/username/Templates`.
171
+
-[x] Customizer must not rely ever on the working directory, that is why relative paths are completely avoided
172
+
(only allowed in necessary cases in . In the same vein, files must not be downloaded in the working directory, they
173
+
should be deleted in a controlled location. In most cases, this location is `BIN_FOLDER`.
129
174
-[ ] All variables should be declared with the needed scope and its write/read permissions (local-r)
130
175
131
176
###### Structural
132
-
-[x] The software that is manually installed is put under `BIN_FOLDER`, which by default points to `~/.bin`. `~/.bin` and is always **present** during the execution of `install.sh`.
133
-
-[x] Shell features are not installed directly into `~/.bashrc`, instead, there is always present during the runtime of `install sh` the file `$BIN_FOLDER/bash_functions/.bash_functions`, which is a file imported by `~/.bashrc`. In `~/.bash_functions`, you can write imports to individual scripts that provide a feature to the shell environment. Usually those scripts are stored under `~/.bin/bash_functions/`, which is a location always present. So the generic way to include new content to `~/.bashrc` is writing a script to `~/.bin/bash_functions` and including it in `~/.bash_functions/`.
134
-
-[ ] Soft links to include a program in the PATH are created under `DIR_IN_PATH` which by default points to `~/.local/bin` a directory that is usually already in the PATH. If not, `install.sh` will add it at the beginning of the installation
135
-
-[ ] Files or folders created as root need to change their permissions and also its group and owner to the `${SUDO_USER}` using `chgrp` and `chown`
136
-
-[ ] console features are not installed directly in bashrc; instead use the structure provided by the customizer using .bash_functions
137
-
-[ ] Code lines length is 120 maximum. Lines with more characters need to be split in many. Some exceptions may apply, for example when defining vars that contain links.
177
+
-[x] The software that is manually installed is put under `BIN_FOLDER`, which by default points to `~/.bin`. `~/.bin`
178
+
and is always **present** during the execution of `install.sh`.
179
+
-[x] Shell features are not installed directly into `~/.bashrc`, instead, there is always present during the runtime
180
+
of `install sh` the file `$BIN_FOLDER/bash_functions/.bash_functions`, which is a file imported by `~/.bashrc`.
181
+
In `~/.bash_functions`, you can write imports to individual scripts that provide a feature to the shell environment.
182
+
Usually those scripts are stored under `~/.bin/bash_functions/`, which is a location always present. So the generic
183
+
way to include new content to `~/.bashrc` is writing a script to `~/.bin/bash_functions` and including it in
184
+
`~/.bash_functions/`.
185
+
-[ ] Soft links to include a program in the PATH are created under `DIR_IN_PATH` which by default points to
186
+
`~/.local/bin` a directory that is usually already in the PATH. If not, `install.sh` will add it at the beginning of
187
+
the installation
188
+
-[ ] Files or folders created as root need to change their permissions and also its group and owner to the
189
+
`${SUDO_USER}` using `chgrp` and `chown`
190
+
-[ ] console features are not installed directly in bashrc; instead use the structure provided by the customizer using
191
+
.bash_functions
192
+
-[ ] Code lines length is 120 maximum. Lines with more characters need to be split in many. Some exceptions may apply,
193
+
for example when defining vars that contain links.
138
194
-[ ] help lines in 80 characters.
139
-
-[ ] The tests used in the conditional ifs must be with [] instead of [[]] when possible. The last one is a bash exclusive feature that we can not find in other shells.
195
+
-[ ] The tests used in the conditional ifs must be with [] instead of [[]] when possible. The last one is a bash
196
+
exclusive feature that we can not find in other shells.
140
197
141
-
(Everything here is by default)
142
-
~/.customizer/
143
-
bin/ # decompressed files in directories, venvs and manual downloads of icons or other.
198
+
###### Behavioural
199
+
-[x] Each feature is expected to be executed with certain permissions (root / normal user). So the script will skip a
200
+
feature that needs to be installed with different permissions from the ones that currently has.
201
+
-[x] No unprotected `cd` commands. `cd` must be avoided and never change the working directory given from the outside,
202
+
that is why they must be called from the inside of a subshell if present.
203
+
-[x] Relative PATHs are forbidden. We must not rely or modify the working directory of the environment of the script.
204
+
`cd` can be used safely inside a subshell: `$(cd ${BIN_FOLDER} && echo thing`
205
+
-[x] no `apt`, the default way to install package in script is `apt-get`
206
+
-[x] Only in special cases use echo directly to print to stdout. In most cases you need to use
207
+
`output_proxy_executioner`
208
+
-[x] desktop launchers created manually have to be created in the desktop and also in the user launchers folder
209
+
-[x] desktop launchers created manually as root have to be in the desktop and also in the all users launchers folder
210
+
-[ ] All `ln`s are created with the option -f, to avoid collision problems.
211
+
-[ ] wget is always used with the `-O` flag, which is used to change the name of the file and / or select a destination
212
+
for the download.
213
+
-[ ] tar is always used in a subshell, cd'ing into an empty directory before the tar, so the working directory of the
214
+
script is never filled with temporary files.
215
+
216
+
###### Syntactical
217
+
-[ ] All variables must be expanded by using `${VAR_NAME}` (include the brackets) except for the special ones, like
218
+
`$#`, `$@`, `$!`, `$?`, etc.
219
+
-[ ] There is one blankline between functions in the same block. There is two blanklines between blocks.
220
+
-[ ] using ~ or $HOME instead of HOME_FOLDER
221
+
-[ ] All variables must be protected by using "" to avoid resplitting because of spaces, despite, customizer is not
222
+
emphasized to work with spaces in its variables. Spaces are *evil* in some paths are not considered.
223
+
-[ ] Indent is always 2 spaces and never TAB.
224
+
-[ ] Categories in each desktop launcher: Name, GenericName, Type, Comment, Version, StartupWMClass, Icon, Exec,
The folder used to install customizer functionalities has the following structure by default:
229
+
```bash
230
+
~/.customizer/ # Installation folder, where ~ is the HOME folder of the user invoking sudo
231
+
bin/ # Contains a directory for each feature that has to keep a download, create a virtual env, decompress a file, etc.
144
232
studio/
145
233
clion/
146
234
...
147
-
cache/ # download will download here and move or copy the download to it's destination depending on the flag
148
-
clion_downloading
235
+
temp/ # Downloads will happen here but will be moved afterwards to the destiny location; thus, we will only find failed downloads here
236
+
clion_downloading.1 # Failed download. It can be safely deleted
237
+
cache/ # All downloads will be moved here before moving them to its final destination. If a required file to download is already here, it will use the one already in the cache and will ommit the download
238
+
clion_downloading # cached file
149
239
mendeley_downloading
150
240
studio_downloading
151
241
...
152
-
data/
242
+
data/# Contains the files that are used as a database of the used keybindings, active functions, active favorite launchers in the dash...
153
243
favorites.txt
154
244
keybinds.txt
155
245
bash_functions.sh
156
246
bash_initializations.sh
157
-
functions/
247
+
functions/# Contains the bash files that can be included in the bash environment by using the file data/bash_functions.sh
158
248
a.sh
159
249
b.sh
160
250
...
161
-
initializations/
251
+
initializations/# Contains the bash files that can be included at the beginning of the session by using the file data/bash_initializations.sh
162
252
keybinds.sh
163
-
164
-
###### Behavioural
165
-
-[x] Each feature is expected to be executed with certain permissions (root / normal user). So the script will skip a feature that needs to be installed with different permissions from the ones that currently has.
166
-
-[x] No unprotected `cd` commands. `cd` must be avoided and never change the working directory given from the outside, that is why they must be called from the inside of a subshell if present.
167
-
-[x] Relative PATHs are forbidden. We must not rely or modify the working directory of the environment of the script. `cd` can be used safely inside a subshell: `$(cd ${BIN_FOLDER} && echo thing`
168
-
-[x] no `apt`, the default way to install package in script is `apt-get`
169
-
-[x] Only in special cases use echo directly to print to stdout. In most cases you need to use `output_proxy_executioner`
170
-
-[x] desktop launchers created manually have to be created in the desktop and also in the user launchers folder
171
-
-[x] desktop launchers created manually as root have to be in the desktop and also in the all users launchers folder
172
-
-[ ] All `ln`s are created with the option -f, to avoid collision problems.
173
-
-[ ] wget is always used with the `-O` flag, which is used to change the name of the file and / or select a destination for the download.
174
-
-[ ] tar is always used in a subshell, cd'ing into an empty directory before the tar, so the working directory of the script is never filled with temporary files.
175
-
176
-
###### Syntactical
177
-
-[ ] All variables must be expanded by using `${VAR_NAME}` (include the brackets) except for the special ones, like `$#`, `$@`, `$!`, `$?`, etc.
178
-
-[ ] There is one blankline between functions in the same block. There is two blanklines between blocks.
179
-
-[ ] using ~ or $HOME instead of HOME_FOLDER
180
-
-[ ] All variables must be protected by using "" to avoid resplitting because of spaces, despite, customizer is not emphasized to work with spaces in its variables. Spaces are *evil* in some paths are not considered.
181
-
-[ ] Indent is always 2 spaces and never TAB.
182
-
-[ ] Categories in each desktop launcher: Name, GenericName, Type, Comment, Version, StartupWMClass, Icon, Exec, Terminal, Categories=IDE;Programming;, StartupNotify, MimeType=x-scheme-handler/tg;, Encoding=UTF-8
0 commit comments