Removed .sh from names, packs support

This commit is contained in:
Anthony Axenov 2022-07-04 19:34:00 +08:00
parent 4a71dd0ae8
commit e9cd7ee2ae
Signed by: anthony
GPG Key ID: EA9EC32FF7CCD4EC
29 changed files with 68 additions and 34 deletions

View File

@ -1,8 +1,11 @@
# Autogenerated at 04.07.2022 19:08 using ./gen-makefile.sh
# Autogenerated at 04.07.2022 19:25 using ./gen-makefile.sh
##lamp: Apache + php + mariadb
lamp: apache php mariadb
##apache: Install apache2 (latest)
apache:
./install/apache.sh
./install/apache
##apt: Install bunch of software from apt
apt:
@ -84,6 +87,10 @@ syncthing:
telebit:
./install/telebit.sh
##todo: <no description>
todo:
./install/todo
##ulauncher: Install ulauncher (latest) + ppa
ulauncher:
./install/ulauncher.sh

View File

@ -39,7 +39,7 @@ wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt.s
./install/apt.sh
```
## How to add a new software script here
## How to add a new software script?
1. Create new `./install/*.sh` script.
At the beggining of a file you must write these two lines:
@ -50,3 +50,24 @@ wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt.s
2. Test your script
3. Run `./gen-makefile.sh` to generate new `./Makefile`
## 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`

View File

@ -2,7 +2,11 @@
mv Makefile Makefile.bak
echo -e "# Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]}\n" > Makefile
for file in ./install/*.sh; do
for file in ./packs/*; do
cat ${file} >> Makefile
done;
for file in ./install/*; do
name=${file##*/}
name=${name%.sh}
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})

2
packs/lamp.makefile Normal file
View File

@ -0,0 +1,2 @@
##lamp: Apache + php + mariadb
lamp: apache php mariadb