2022-07-04 09:56:45 +00:00
# My Ubuntu environment
2021-12-22 13:51:22 +00:00
2022-07-04 09:56:45 +00:00
`make` -ready bunch of scripts for easily installation of different software.
2021-12-22 13:51:22 +00:00
2022-07-04 14:12:37 +00:00
## Requirements
2022-01-08 06:07:53 +00:00
2022-07-05 02:53:41 +00:00
* Ubuntu >= 20.04 (not tested with version < 20 )
2022-08-25 14:33:02 +00:00
* `bash` , `zsh` or other POSIX-compatible shell
2022-07-04 14:12:37 +00:00
* `make` (optional but recommended)
* `wget` (necessary for some scripts)
* `git` (necessary for some scripts)
2022-01-08 06:07:53 +00:00
2022-07-05 02:53:41 +00:00
If some dependecies are missed for some of these scripts it is enougth to run `./install/apt` in most cases.
2022-07-04 09:56:45 +00:00
## Usage
2022-01-08 06:07:53 +00:00
2022-07-04 09:56:45 +00:00
### Clone this repo (recommended)
2021-12-22 13:51:22 +00:00
```shell
2022-07-04 09:56:45 +00:00
# if git is installed
git clone git@git.axenov.dev:anthony/my-env.git --depth=1
2021-12-22 13:51:22 +00:00
2022-07-04 09:56:45 +00:00
# if git is not installed
wget -qO - https://git.axenov.dev/anthony/my-env/archive/master.tar.gz | tar -zxf -
2021-12-22 13:51:22 +00:00
2022-07-04 09:56:45 +00:00
# switch to repo dir
cd my-env
2022-01-08 06:07:53 +00:00
2022-07-05 02:53:41 +00:00
# generate fresh ./Makefile and get full list of `make` goals
./gen-makefile
2022-07-04 09:56:45 +00:00
# get full list of `make` goals
2022-08-19 13:26:09 +00:00
make
2021-12-22 13:51:22 +00:00
```
2022-07-04 09:56:45 +00:00
### Selective straightforward installation
2022-01-08 06:07:53 +00:00
```shell
2022-07-04 09:56:45 +00:00
# from remote file
2022-07-05 02:53:41 +00:00
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt | bash
2022-07-04 09:56:45 +00:00
# from locally cloned repo
2022-07-05 02:53:41 +00:00
./install/apt
2022-01-08 06:07:53 +00:00
```
2022-07-04 11:34:00 +00:00
## How to add a new software script?
2022-01-08 06:07:53 +00:00
2022-07-05 02:53:41 +00:00
1. Create new `./install/*` script.
2022-07-04 09:56:45 +00:00
At the beggining of a file you must write these two lines:
```shell
#!/bin/bash
##makedesc: Your description for Makefile
```
2. Test your script
2022-07-05 02:53:41 +00:00
3. Run `./gen-makefile` to generate new `./Makefile`
2022-01-08 06:07:53 +00:00
2022-07-04 11:34:00 +00:00
## How to create packs?
You can create new file inside `./packs` dir.
Syntax is same as classic makefile with one important and necessary addition -- a comment started with `##` :
```makefile
2022-08-25 14:33:02 +00:00
# Pack description
2022-07-04 11:34:00 +00:00
mypack1: goal1 goal2 goalX ...
...
2022-08-25 14:33:02 +00:00
# Pack description
2022-08-19 13:26:09 +00:00
mypackX: goalA goalB
2022-07-04 11:34:00 +00:00
@cp file1 file2
...
...
```
where:
* `mypack*` is the pack name
* `goal*` are script names in `./install`
2022-07-04 15:25:31 +00:00
2022-07-04 15:53:39 +00:00
## Testing in docker (not recommended)
> Note that this is almost useless way to test since you'll meet errors in many cases because dockerized OS is not fully-functional and will never be.
>
> You can use docker to test something **really simple**, e.g. to check general script steps or install cli tools.
>
> In other cases you need virtualized Ubuntu instead of dockerized one, so I strongly recommend you to use [VirtualBox](https://www.virtualbox.org/wiki/Downloads) or your host machine.
2022-07-04 15:25:31 +00:00
```shell
# switch to repo dir
cd my-env
# build and run container
docker build -t myenv . & & docker run -it myenv
2022-07-04 15:53:39 +00:00
# or oneliner
2022-07-04 15:25:31 +00:00
docker run -it $(docker build -q .)
```
Now you can play around with scripts.
2022-07-04 15:53:39 +00:00
2022-07-05 02:53:41 +00:00
## TODO
* build: [flameshot ](https://github.com/flameshot-org/flameshot#compilation )
* build: [rustdesk ](https://github.com/rustdesk/rustdesk#build )
* [JB mono ](https://www.jetbrains.com/ru-ru/lp/mono/#how-to-install ) ([2](https://fonts.google.com/specimen/JetBrains+Mono))
* update scripts (when possible)
* uninstall scripts (when possible)
2022-07-04 15:53:39 +00:00
## License
[WTFPLv2 ](LICENSE )