diff --git a/Makefile b/Makefile index 5216964..bc9102e 100644 --- a/Makefile +++ b/Makefile @@ -1,112 +1,119 @@ -# Autogenerated at 04.07.2022 19:08 using ./gen-makefile.sh +# Autogenerated at 04.07.2022 19:25 using ./gen-makefile.sh -## apache: Install apache2 (latest) +##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: Install bunch of software from apt apt: ./install/apt.sh -## chrome: Install google chrome (latest) +##chrome: Install google chrome (latest) chrome: ./install/chrome.sh -## composer: Install composer (latest) +##composer: Install composer (latest) composer: ./install/composer.sh -## docker: Install docker (latest) + docker-compose (latest) + ppa +##docker: Install docker (latest) + docker-compose (latest) + ppa docker: ./install/docker.sh -## droidcam-obs: Install droidcam-obs plugin v1.5.1 +##droidcam-obs: Install droidcam-obs plugin v1.5.1 droidcam-obs: ./install/droidcam-obs.sh -## droidcam: Install droidcam v1.8.2 +##droidcam: Install droidcam v1.8.2 droidcam: ./install/droidcam.sh -## git: Install git (latest) +##git: Install git (latest) git: ./install/git.sh -## golang: Install golang v1.18.3 +##golang: Install golang v1.18.3 golang: ./install/golang.sh -## grubc: Install grub-customizer (latest) + ppa +##grubc: Install grub-customizer (latest) + ppa grubc: ./install/grubc.sh -## kde-appmenu: Install KDE Window AppMenu Applet +##kde-appmenu: Install KDE Window AppMenu Applet kde-appmenu: ./install/kde-appmenu.sh -## lite-xl: Install lite-xl v2.0.5 (draft) +##lite-xl: Install lite-xl v2.0.5 (draft) lite-xl: ./install/lite-xl.sh -## mariadb: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed) +##mariadb: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed) mariadb: ./install/mariadb.sh -## nodejs: Install nodejs + npm via nvm +##nodejs: Install nodejs + npm via nvm nodejs: ./install/nodejs.sh -## pgsql: Install postgresql (latest) and php-pgsql (if php is installed) +##pgsql: Install postgresql (latest) and php-pgsql (if php is installed) pgsql: ./install/pgsql.sh -## php: Install php v8.1 + ppa +##php: Install php v8.1 + ppa php: ./install/php.sh -## postman: Install postman (latest) +##postman: Install postman (latest) postman: ./install/postman.sh -## rustdesk: Install rustdesk v1.1.8 (deb) +##rustdesk: Install rustdesk v1.1.8 (deb) rustdesk: ./install/rustdesk.sh -## snap: Install bunch of software from snap +##snap: Install bunch of software from snap snap: ./install/snap.sh -## syncthing: Install syncthing (latest) + ppa +##syncthing: Install syncthing (latest) + ppa syncthing: ./install/syncthing.sh -## telebit: Install telebit (latest) +##telebit: Install telebit (latest) telebit: ./install/telebit.sh -## ulauncher: Install ulauncher (latest) + ppa +##todo: +todo: + ./install/todo + +##ulauncher: Install ulauncher (latest) + ppa ulauncher: ./install/ulauncher.sh -## wine: Installwine (latest) + ppa (focal) +##wine: Installwine (latest) + ppa (focal) wine: ./install/wine.sh -## zint: Install zint (latest) +##zint: Install zint (latest) zint: ./install/zint.sh -## zsh: Install zsh + omz (latest) +##zsh: Install zsh + omz (latest) zsh: ./install/zsh.sh -## help: Show this help message +##help: Show this help message help: Makefile @echo "Usage:" @echo "\tmake \n" @echo "Available goals:" @sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/" -## _: Same as 'cat ./install/.sh' +##_: Same as 'cat ./install/.sh' %_: @cat ./install/$*.sh diff --git a/README.md b/README.md index dc9989d..ed9c3fb 100644 --- a/README.md +++ b/README.md @@ -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` diff --git a/gen-makefile.sh b/gen-makefile.sh index 99c27bc..9b78cce 100755 --- a/gen-makefile.sh +++ b/gen-makefile.sh @@ -2,23 +2,27 @@ 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}) [ -z "$desc" ] && desc='' - echo -e "## ${name}: ${desc}\n${name}:\n\t${file}\n" >> Makefile + echo -e "##${name}: ${desc}\n${name}:\n\t${file}\n" >> Makefile done; cat << EOF >> Makefile -## help: Show this help message +##help: Show this help message help: Makefile @echo "Usage:" @echo "\tmake \n" @echo "Available goals:" @sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/" -## _: Same as 'cat ./install/.sh' +##_: Same as 'cat ./install/.sh' %_: @cat ./install/\$*.sh EOF diff --git a/install/apache.sh b/install/apache similarity index 100% rename from install/apache.sh rename to install/apache diff --git a/install/apt.sh b/install/apt similarity index 100% rename from install/apt.sh rename to install/apt diff --git a/install/chrome.sh b/install/chrome similarity index 100% rename from install/chrome.sh rename to install/chrome diff --git a/install/composer.sh b/install/composer similarity index 100% rename from install/composer.sh rename to install/composer diff --git a/install/docker.sh b/install/docker similarity index 100% rename from install/docker.sh rename to install/docker diff --git a/install/droidcam.sh b/install/droidcam similarity index 100% rename from install/droidcam.sh rename to install/droidcam diff --git a/install/droidcam-obs.sh b/install/droidcam-obs similarity index 100% rename from install/droidcam-obs.sh rename to install/droidcam-obs diff --git a/install/git.sh b/install/git similarity index 100% rename from install/git.sh rename to install/git diff --git a/install/golang.sh b/install/golang similarity index 100% rename from install/golang.sh rename to install/golang diff --git a/install/grubc.sh b/install/grubc similarity index 100% rename from install/grubc.sh rename to install/grubc diff --git a/install/kde-appmenu.sh b/install/kde-appmenu similarity index 100% rename from install/kde-appmenu.sh rename to install/kde-appmenu diff --git a/install/lite-xl.sh b/install/lite-xl similarity index 100% rename from install/lite-xl.sh rename to install/lite-xl diff --git a/install/mariadb.sh b/install/mariadb similarity index 100% rename from install/mariadb.sh rename to install/mariadb diff --git a/install/nodejs.sh b/install/nodejs similarity index 100% rename from install/nodejs.sh rename to install/nodejs diff --git a/install/pgsql.sh b/install/pgsql similarity index 100% rename from install/pgsql.sh rename to install/pgsql diff --git a/install/php.sh b/install/php similarity index 100% rename from install/php.sh rename to install/php diff --git a/install/postman.sh b/install/postman similarity index 100% rename from install/postman.sh rename to install/postman diff --git a/install/rustdesk.sh b/install/rustdesk similarity index 100% rename from install/rustdesk.sh rename to install/rustdesk diff --git a/install/snap.sh b/install/snap similarity index 100% rename from install/snap.sh rename to install/snap diff --git a/install/syncthing.sh b/install/syncthing similarity index 100% rename from install/syncthing.sh rename to install/syncthing diff --git a/install/telebit.sh b/install/telebit similarity index 100% rename from install/telebit.sh rename to install/telebit diff --git a/install/ulauncher.sh b/install/ulauncher similarity index 100% rename from install/ulauncher.sh rename to install/ulauncher diff --git a/install/wine.sh b/install/wine similarity index 100% rename from install/wine.sh rename to install/wine diff --git a/install/zint.sh b/install/zint similarity index 100% rename from install/zint.sh rename to install/zint diff --git a/install/zsh.sh b/install/zsh similarity index 100% rename from install/zsh.sh rename to install/zsh diff --git a/packs/lamp.makefile b/packs/lamp.makefile new file mode 100644 index 0000000..be191ad --- /dev/null +++ b/packs/lamp.makefile @@ -0,0 +1,2 @@ +##lamp: Apache + php + mariadb +lamp: apache php mariadb