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 09:56:45 +00:00
|
|
|
## Prerequisites
|
2022-01-08 06:07:53 +00:00
|
|
|
|
2022-07-04 09:56:45 +00:00
|
|
|
* `bash`, `zsh` or other `sh`-compatible shell
|
|
|
|
* `make`
|
|
|
|
* `git` or `wget`
|
2022-01-08 06:07:53 +00:00
|
|
|
|
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-04 09:56:45 +00:00
|
|
|
# get full list of `make` goals
|
|
|
|
make help
|
2021-12-22 13:51:22 +00:00
|
|
|
|
2022-07-04 09:56:45 +00:00
|
|
|
# generate new ./Makefile and get full list of `make` goals
|
|
|
|
./gen-makefile.sh
|
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
|
|
|
|
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt.sh | bash
|
|
|
|
|
|
|
|
# from locally cloned repo
|
|
|
|
./install/apt.sh
|
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-04 09:56:45 +00:00
|
|
|
1. Create new `./install/*.sh` script.
|
|
|
|
At the beggining of a file you must write these two lines:
|
|
|
|
```shell
|
|
|
|
#!/bin/bash
|
|
|
|
##makedesc: Your description for Makefile
|
|
|
|
```
|
|
|
|
2. Test your script
|
|
|
|
3. Run `./gen-makefile.sh` 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
|
|
|
|
##mypack1: Pack description
|
|
|
|
mypack1: goal1 goal2 goalX ...
|
|
|
|
...
|
|
|
|
|
|
|
|
##mypackX: Pack description
|
|
|
|
mypackY: goalA goalB
|
|
|
|
@cp file1 file2
|
|
|
|
...
|
|
|
|
...
|
|
|
|
```
|
|
|
|
|
|
|
|
where:
|
|
|
|
* `mypack*` is the pack name
|
|
|
|
* `goal*` are script names in `./install`
|