Compare commits
141 Commits
experiment
...
d41f6505b9
| Author | SHA1 | Date | |
|---|---|---|---|
|
d41f6505b9
|
|||
|
c4c7d298e0
|
|||
|
e95ccf042b
|
|||
|
1a912bf645
|
|||
|
1c2abec8a7
|
|||
|
a71b682f49
|
|||
|
df826ba9c9
|
|||
|
737da43522
|
|||
|
890f09b82b
|
|||
|
4b1bd30170
|
|||
|
5842b954e3
|
|||
|
a52ce34748
|
|||
|
024b3311e0
|
|||
|
22d12fd902
|
|||
|
def4f6761a
|
|||
|
ed10ab05d4
|
|||
|
b6817506e0
|
|||
|
479ac2064f
|
|||
|
4014f83402
|
|||
|
bf970f58cd
|
|||
|
7159850e83
|
|||
|
3ef8692684
|
|||
|
efa60f5231
|
|||
|
ee8cbd0fe4
|
|||
|
3c87f837eb
|
|||
|
6d7719d568
|
|||
|
e9638e845c
|
|||
|
b2cf7c154e
|
|||
|
b988524c2d
|
|||
|
a73a442f07
|
|||
|
f9f8f5b2dc
|
|||
|
79db21f336
|
|||
|
bb78d67565
|
|||
|
8b9aecc754
|
|||
|
f3f6e8fd31
|
|||
|
5bf67b1c8e
|
|||
| 9baedd438f | |||
|
49595c7df5
|
|||
|
8ad20ca7fd
|
|||
|
7cc6888cca
|
|||
|
19d9f17f77
|
|||
|
86c7c92ae0
|
|||
|
4670ee9b57
|
|||
|
c261d62b36
|
|||
|
acc7907a72
|
|||
|
ba9c1bf28d
|
|||
|
7fcf9ad9e6
|
|||
|
84822bd7fa
|
|||
|
99ffbf68f8
|
|||
|
a5388f5127
|
|||
|
3339928940
|
|||
|
bc0a2e4426
|
|||
| 805716e9b4 | |||
|
be8d9ab4a6
|
|||
|
3bb7ec3564
|
|||
|
01896666f2
|
|||
|
aaec3096f9
|
|||
|
46ca617c1a
|
|||
|
90dc1b4d8b
|
|||
|
f89b2d946d
|
|||
|
0aac460d63
|
|||
|
aab50b0401
|
|||
|
28692bfcf5
|
|||
|
2d2380fd62
|
|||
|
f20a161373
|
|||
|
3a853564c1
|
|||
|
5abc1c9434
|
|||
|
7136fac018
|
|||
|
7554e57ea4
|
|||
|
e6411438c5
|
|||
|
e86281c967
|
|||
|
04c74e1d00
|
|||
|
5f2d2e2011
|
|||
|
8f2b1fa137
|
|||
|
14e841cc80
|
|||
|
6d7460c5b0
|
|||
|
d262e8f202
|
|||
|
27659f8ad5
|
|||
|
0aec6382bd
|
|||
|
4223f7845d
|
|||
|
accce0dddb
|
|||
|
292e15199c
|
|||
|
acacd1657c
|
|||
|
3c527a8dee
|
|||
|
0e90625d7c
|
|||
|
afbb634566
|
|||
|
bc9eb794a8
|
|||
|
4637b069f9
|
|||
|
05e6b8195b
|
|||
|
8c6a191d61
|
|||
|
b7856f6529
|
|||
|
3e3c03a2e1
|
|||
|
155352f8ad
|
|||
|
14362f6165
|
|||
|
8b809bafca
|
|||
|
40d214e99b
|
|||
|
e4e64a8ab1
|
|||
|
8de641fd68
|
|||
|
32bdf4b44d
|
|||
|
d7d27849a1
|
|||
|
3f08b3ed06
|
|||
|
fc7ff9613a
|
|||
|
41180043ae
|
|||
|
a68074cb01
|
|||
|
91be1a194b
|
|||
|
322239ec1f
|
|||
|
7ddcc73454
|
|||
|
a60d66a84d
|
|||
|
0f118e015e
|
|||
|
af93865525
|
|||
|
8ffc2dfe32
|
|||
|
c1150af922
|
|||
|
7185a3cf7f
|
|||
|
c48971a858
|
|||
|
aaf88521b3
|
|||
|
355953dc35
|
|||
|
43f6c8c9e9
|
|||
|
2c9af9b1c5
|
|||
|
4b677a9ab8
|
|||
|
af2a7f3c80
|
|||
|
d3263e6da5
|
|||
|
bdcd8e6bec
|
|||
|
a6e0696e31
|
|||
|
f61f09b83f
|
|||
|
6bb9442c43
|
|||
|
c54e71d28c
|
|||
|
8d64efba39
|
|||
|
cc2ab13310
|
|||
|
113c1df71b
|
|||
|
24f30e8eff
|
|||
|
bcb1111a0a
|
|||
|
3fa1a4d09d
|
|||
|
6c11b5d76d
|
|||
|
82559869fc
|
|||
|
4677b84a29
|
|||
|
7008ec36b7
|
|||
|
f2d41885af
|
|||
|
9972fc6d9d
|
|||
|
f7ef85aad9
|
|||
|
3043a41365
|
|||
|
47c1e6d40b
|
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[{install/*, uninstall/*, upgrade/*}]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
|
||||||
|
[{packs/*, Makefile*}]
|
||||||
|
indent_style = tab
|
||||||
|
indent_size = 4
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1 +1,2 @@
|
|||||||
*.bak
|
*.bak
|
||||||
|
*.log
|
||||||
|
|||||||
13
LICENSE
Normal file
13
LICENSE
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
Version 2, December 2004
|
||||||
|
|
||||||
|
Copyright (C) 2022 Антон Аксенов <anthonyaxenov@gmail.com>
|
||||||
|
|
||||||
|
Everyone is permitted to copy and distribute verbatim or modified
|
||||||
|
copies of this license document, and changing it is allowed as long
|
||||||
|
as the name is changed.
|
||||||
|
|
||||||
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||||
288
Makefile
288
Makefile
@@ -1,114 +1,310 @@
|
|||||||
# Autogenerated at 04.07.2022 22:11 using ./gen-makefile.sh
|
# Autogenerated at 22.11.2024 09:40 using ./gen-makefile
|
||||||
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
##lamp: Apache + php + mariadb
|
#===============================================
|
||||||
lamp: apache php mariadb
|
# Scripts listed in ./install
|
||||||
##apache: Install apache2 (latest)
|
#===============================================
|
||||||
apache:
|
|
||||||
./install/apache
|
|
||||||
|
|
||||||
##apt: Install bunch of software from apt
|
##apache2: Install apache2 (latest)
|
||||||
|
apache2:
|
||||||
|
@./install/apache2
|
||||||
|
|
||||||
|
##apt: Install software from apt
|
||||||
apt:
|
apt:
|
||||||
./install/apt
|
@./install/apt
|
||||||
|
|
||||||
|
##canon-mg2500: Install Canon Pixma MG2500 + ppa
|
||||||
|
canon-mg2500:
|
||||||
|
@./install/canon-mg2500
|
||||||
|
|
||||||
##chrome: Install google chrome (latest)
|
##chrome: Install google chrome (latest)
|
||||||
chrome:
|
chrome:
|
||||||
./install/chrome
|
@./install/chrome
|
||||||
|
|
||||||
##composer: Install composer (latest)
|
##composer: Install composer (latest)
|
||||||
composer:
|
composer:
|
||||||
./install/composer
|
@./install/composer
|
||||||
|
|
||||||
##docker: Install docker (latest) + docker-compose (latest) + ppa
|
##docker: Install docker (latest) + docker-compose (latest) + ppa
|
||||||
docker:
|
docker:
|
||||||
./install/docker
|
@./install/docker
|
||||||
|
|
||||||
##droidcam: Install droidcam v1.8.2
|
##dots: Install dotfiles
|
||||||
|
dots:
|
||||||
|
@./install/dots
|
||||||
|
|
||||||
|
##droidcam: Install droidcam v1.9.0
|
||||||
droidcam:
|
droidcam:
|
||||||
./install/droidcam
|
@./install/droidcam
|
||||||
|
|
||||||
##droidcam-obs: Install droidcam-obs plugin v1.5.1
|
##droidcam-obs: Install droidcam-obs plugin v1.5.1
|
||||||
droidcam-obs:
|
droidcam-obs:
|
||||||
./install/droidcam-obs
|
@./install/droidcam-obs
|
||||||
|
|
||||||
|
##flameshot: Install flameshot (latest)
|
||||||
|
flameshot:
|
||||||
|
@./install/flameshot
|
||||||
|
|
||||||
|
##frkn: Install Wireguard + FRKN
|
||||||
|
frkn:
|
||||||
|
@./install/frkn
|
||||||
|
|
||||||
##git: Install git (latest)
|
##git: Install git (latest)
|
||||||
git:
|
git:
|
||||||
./install/git
|
@./install/git
|
||||||
|
|
||||||
##golang: Install golang v1.18.3
|
##golang: Install golang v1.21.0
|
||||||
golang:
|
golang:
|
||||||
./install/golang
|
@./install/golang
|
||||||
|
|
||||||
##grubc: Install grub-customizer (latest) + ppa
|
##grub-customizer: Install grub-customizer (latest + ppa)
|
||||||
grubc:
|
grub-customizer:
|
||||||
./install/grubc
|
@./install/grub-customizer
|
||||||
|
|
||||||
|
##jbmono: Install JetBrains Mono fonts
|
||||||
|
jbmono:
|
||||||
|
@./install/jbmono
|
||||||
|
|
||||||
##kde-appmenu: Install KDE Window AppMenu Applet
|
##kde-appmenu: Install KDE Window AppMenu Applet
|
||||||
kde-appmenu:
|
kde-appmenu:
|
||||||
./install/kde-appmenu
|
@./install/kde-appmenu
|
||||||
|
|
||||||
##lite-xl: Install lite-xl v2.0.5 (draft)
|
##kde-backports: Install KDE Backports
|
||||||
|
kde-backports:
|
||||||
|
@./install/kde-backports
|
||||||
|
|
||||||
|
##kde-file-templates: Install file templates (KDE)
|
||||||
|
kde-file-templates:
|
||||||
|
@./install/kde-file-templates
|
||||||
|
|
||||||
|
##kde-portal: Install KDE portal
|
||||||
|
kde-portal:
|
||||||
|
@./install/kde-portal
|
||||||
|
|
||||||
|
##lazynvim: <no description>
|
||||||
|
lazynvim:
|
||||||
|
@./install/lazynvim
|
||||||
|
|
||||||
|
##libreoffice: Install libreoffice
|
||||||
|
libreoffice:
|
||||||
|
@./install/libreoffice
|
||||||
|
|
||||||
|
##lite-xl: Install lite-xl
|
||||||
lite-xl:
|
lite-xl:
|
||||||
./install/lite-xl
|
@./install/lite-xl
|
||||||
|
|
||||||
##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:
|
mariadb:
|
||||||
./install/mariadb
|
@./install/mariadb
|
||||||
|
|
||||||
##nodejs: Install nodejs + npm via nvm
|
##nodejs: Install nodejs + npm via nvm
|
||||||
nodejs:
|
nodejs:
|
||||||
./install/nodejs
|
@./install/nodejs
|
||||||
|
|
||||||
|
##ntfy: Install ntfy (latest) + ppa
|
||||||
|
ntfy:
|
||||||
|
@./install/ntfy
|
||||||
|
|
||||||
|
##obs-studio: Install obs-studio (latest snap)
|
||||||
|
obs-studio:
|
||||||
|
@./install/obs-studio
|
||||||
|
|
||||||
|
##omz-clean: Install omz (latest)
|
||||||
|
omz-clean:
|
||||||
|
@./install/omz-clean
|
||||||
|
|
||||||
|
##omz-fancy: Install omz fancy (powerline10k + MesloLGS font)
|
||||||
|
omz-fancy:
|
||||||
|
@./install/omz-fancy
|
||||||
|
|
||||||
|
##openvpn: Install openvpn v2.6.3 (src)
|
||||||
|
openvpn:
|
||||||
|
@./install/openvpn
|
||||||
|
|
||||||
|
##papirus: Install papirus-icon-theme (latest)
|
||||||
|
papirus:
|
||||||
|
@./install/papirus
|
||||||
|
|
||||||
##pgsql: Install postgresql (latest) and php-pgsql (if php is installed)
|
##pgsql: Install postgresql (latest) and php-pgsql (if php is installed)
|
||||||
pgsql:
|
pgsql:
|
||||||
./install/pgsql
|
@./install/pgsql
|
||||||
|
|
||||||
##php: Install php v8.1 + ppa
|
##php: Install php v8.1 + ppa
|
||||||
php:
|
php:
|
||||||
./install/php
|
@./install/php
|
||||||
|
|
||||||
|
##phpcs: Install phpcs + php-cs-fixer
|
||||||
|
phpcs:
|
||||||
|
@./install/phpcs
|
||||||
|
|
||||||
|
##phpmd: Install phpmd
|
||||||
|
phpmd:
|
||||||
|
@./install/phpmd
|
||||||
|
|
||||||
|
##php-psalm: Install psalm
|
||||||
|
php-psalm:
|
||||||
|
@./install/php-psalm
|
||||||
|
|
||||||
|
##php-spx: Install php-spx
|
||||||
|
php-spx:
|
||||||
|
@./install/php-spx
|
||||||
|
|
||||||
|
##phpstan: Install phpstan
|
||||||
|
phpstan:
|
||||||
|
@./install/phpstan
|
||||||
|
|
||||||
|
##phpunit: Install phpunit
|
||||||
|
phpunit:
|
||||||
|
@./install/phpunit
|
||||||
|
|
||||||
##postman: Install postman (latest)
|
##postman: Install postman (latest)
|
||||||
postman:
|
postman:
|
||||||
./install/postman
|
@./install/postman
|
||||||
|
|
||||||
##rustdesk: Install rustdesk v1.1.8 (deb)
|
##qt5: Install qt5
|
||||||
|
qt5:
|
||||||
|
@./install/qt5
|
||||||
|
|
||||||
|
##rustdesk: Install rustdesk client v1.1.9 (deb)
|
||||||
rustdesk:
|
rustdesk:
|
||||||
./install/rustdesk
|
@./install/rustdesk
|
||||||
|
|
||||||
##snap: Install bunch of software from snap
|
##snap: Install bunch of software from snap
|
||||||
snap:
|
snap:
|
||||||
./install/snap
|
@./install/snap
|
||||||
|
|
||||||
|
##sublimetext: Install Sublime Text (build 4169)
|
||||||
|
sublimetext:
|
||||||
|
@./install/sublimetext
|
||||||
|
|
||||||
##syncthing: Install syncthing (latest) + ppa
|
##syncthing: Install syncthing (latest) + ppa
|
||||||
syncthing:
|
syncthing:
|
||||||
./install/syncthing
|
@./install/syncthing
|
||||||
|
|
||||||
##telebit: Install telebit (latest)
|
##telebit: Install telebit (latest)
|
||||||
telebit:
|
telebit:
|
||||||
./install/telebit
|
@./install/telebit
|
||||||
|
|
||||||
|
##telegram: Install telegram (latest)
|
||||||
|
telegram:
|
||||||
|
@./install/telegram
|
||||||
|
|
||||||
##ulauncher: Install ulauncher (latest) + ppa
|
##ulauncher: Install ulauncher (latest) + ppa
|
||||||
ulauncher:
|
ulauncher:
|
||||||
./install/ulauncher
|
@./install/ulauncher
|
||||||
|
|
||||||
|
##vivaldi: Install Vivaldi + ppa
|
||||||
|
vivaldi:
|
||||||
|
@./install/vivaldi
|
||||||
|
|
||||||
|
##vscode: VSCode deb-package
|
||||||
|
vscode:
|
||||||
|
@./install/vscode
|
||||||
|
|
||||||
##wine: Install wine (latest) + ppa (focal)
|
##wine: Install wine (latest) + ppa (focal)
|
||||||
wine:
|
wine:
|
||||||
./install/wine
|
@./install/wine
|
||||||
|
|
||||||
|
##youtube-dl: Install youtube-dl (src)
|
||||||
|
youtube-dl:
|
||||||
|
@./install/youtube-dl
|
||||||
|
|
||||||
|
##ytdlcue: Install ytdlcue
|
||||||
|
ytdlcue:
|
||||||
|
@./install/ytdlcue
|
||||||
|
|
||||||
##zint: Install zint (latest)
|
##zint: Install zint (latest)
|
||||||
zint:
|
zint:
|
||||||
./install/zint
|
@./install/zint
|
||||||
|
|
||||||
##zsh: Install zsh + omz (latest)
|
##zsh: Install vanilla zsh
|
||||||
zsh:
|
zsh:
|
||||||
./install/zsh
|
@./install/zsh
|
||||||
|
|
||||||
##help: Show this help message
|
|
||||||
|
#===============================================
|
||||||
|
# Scripts listed in ./packs
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
##flameshot: [TODO] [PACK] qt5 + flameshot from source
|
||||||
|
flameshot: qt5 flameshot-build
|
||||||
|
|
||||||
|
##lamp: [PACK] Apache + php + mariadb
|
||||||
|
lamp: apache phpstack mariadb
|
||||||
|
|
||||||
|
##obs: [PACK] Install OBS Studio + droidcam-obs
|
||||||
|
obs: obs-studio droidcam-obs
|
||||||
|
|
||||||
|
##omz: [PACK] zsh + omz + powerline10k + MesloLGS font
|
||||||
|
omz: zsh omz-clean omz-fancy
|
||||||
|
chsh -s /usr/bin/zsh
|
||||||
|
@exec zsh
|
||||||
|
|
||||||
|
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd)
|
||||||
|
phptools: composer php-psalm php-spx phpcs phpmd phpstan phpunit
|
||||||
|
|
||||||
|
##phpstack: [PACK] Install full php stack with tooling
|
||||||
|
phpstack: php phptools
|
||||||
|
|
||||||
|
#===============================================
|
||||||
|
# Scripts listed in ./upgrade
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
##^omz: Upgrade omz
|
||||||
|
^omz:
|
||||||
|
@./upgrade/omz
|
||||||
|
|
||||||
|
#===============================================
|
||||||
|
# Scripts listed in ./uninstall
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
##/apache2: Uninstall apache2
|
||||||
|
/apache2:
|
||||||
|
@./uninstall/apache2
|
||||||
|
|
||||||
|
##/docker: Uninstall docker + ppa
|
||||||
|
/docker:
|
||||||
|
@./uninstall/docker
|
||||||
|
|
||||||
|
##/grub-customizer: Uninstall grub-customizer with ppa
|
||||||
|
/grub-customizer:
|
||||||
|
@./uninstall/grub-customizer
|
||||||
|
|
||||||
|
##/lazynvim: <no description>
|
||||||
|
/lazynvim:
|
||||||
|
@./uninstall/lazynvim
|
||||||
|
|
||||||
|
##/lite-xl: Uninstall lite-xl
|
||||||
|
/lite-xl:
|
||||||
|
@./uninstall/lite-xl
|
||||||
|
|
||||||
|
##/omz: Uninstall omz
|
||||||
|
/omz:
|
||||||
|
@./uninstall/omz
|
||||||
|
|
||||||
|
##/vivaldi: Uninstall vivaldi + ppa
|
||||||
|
/vivaldi:
|
||||||
|
@./uninstall/vivaldi
|
||||||
|
|
||||||
|
#===============================================
|
||||||
|
# Service goals
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
self:
|
||||||
|
@./gen-makefile
|
||||||
help: Makefile
|
help: Makefile
|
||||||
|
@echo "Ubuntu software installator"
|
||||||
|
@echo
|
||||||
@echo "Usage:"
|
@echo "Usage:"
|
||||||
@echo "\tmake <goal>\n"
|
@echo "\tmake help\t - show this help"
|
||||||
@echo "Available goals:"
|
@echo "\tmake self\t - regenerate Makefile (alias of ./gen-makefile)"
|
||||||
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/"
|
@echo "\tmake GOAL\t - install software"
|
||||||
|
@echo "\tmake ^GOAL\t - upgrade software"
|
||||||
##<goal>_: Same as 'cat ./install/<goal>.sh'
|
@echo "\tmake /GOAL\t - uninstall software"
|
||||||
%_:
|
@echo "\nYou can combine GOALs, here are some examples:"
|
||||||
@cat ./install/$*.sh
|
@echo "\tmake /docker docker"
|
||||||
|
@echo "\tmake php /docker ^omz"
|
||||||
|
@echo "\nAvailable GOALs:"
|
||||||
|
@sed -n 's/^##//p' $< | column -ts ':' | sed -e "s/^/\t/"
|
||||||
|
+%:
|
||||||
|
@make
|
||||||
|
|||||||
50
README.md
50
README.md
@@ -4,11 +4,14 @@
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
* Ubuntu >= 20.04 (not tested with version < 20)
|
||||||
* `bash`, `zsh` or other `sh`-compatible shell
|
* `bash`, `zsh` or other `sh`-compatible shell
|
||||||
* `make` (optional but recommended)
|
* `make` (optional but recommended)
|
||||||
* `wget` (necessary for some scripts)
|
* `wget` (necessary for some scripts)
|
||||||
* `git` (necessary for some scripts)
|
* `git` (necessary for some scripts)
|
||||||
|
|
||||||
|
If some dependecies are missed for some of these scripts it is enougth to run `./install/apt` in most cases.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
### Clone this repo (recommended)
|
### Clone this repo (recommended)
|
||||||
@@ -23,39 +26,44 @@ wget -qO - https://git.axenov.dev/anthony/my-env/archive/master.tar.gz | tar -zx
|
|||||||
# switch to repo dir
|
# switch to repo dir
|
||||||
cd my-env
|
cd my-env
|
||||||
|
|
||||||
# get full list of `make` goals
|
# generate fresh ./Makefile and get full list of `make` goals
|
||||||
make help
|
./gen-makefile
|
||||||
|
|
||||||
# generate new ./Makefile and get full list of `make` goals
|
# get full list of `make` goals
|
||||||
./gen-makefile.sh
|
make
|
||||||
```
|
```
|
||||||
|
|
||||||
### Selective straightforward installation
|
### Selective straightforward installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
# from remote file
|
# from remote file (you can meet interaction bugs this way!)
|
||||||
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt.sh | bash
|
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt | bash
|
||||||
|
|
||||||
# from locally cloned repo
|
# from locally cloned repo (except scripts from ./packs)
|
||||||
./install/apt.sh
|
./install/apt
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to add a new software script?
|
## How to add my script?
|
||||||
|
|
||||||
1. Create new `./install/*.sh` script.
|
1. Create a new shell script in `./install`, `./upgrade` or `./uninstall` directory.
|
||||||
At the beggining of a file you must write these two lines:
|
At the beggining of a file you must write these two lines:
|
||||||
```shell
|
```shell
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Your description for Makefile
|
##makedesc: Your description for Makefile
|
||||||
```
|
```
|
||||||
2. Test your script
|
2. Make this script executable, e.g.:
|
||||||
3. Run `./gen-makefile.sh` to generate new `./Makefile`
|
```shell
|
||||||
|
sudo chmod a+x ./install/myscript
|
||||||
|
```
|
||||||
|
3. Test your script
|
||||||
|
4. Run `make self` to generate new `./Makefile`
|
||||||
|
|
||||||
## How to create packs?
|
## How to create a pack?
|
||||||
|
|
||||||
You can create new file inside `./packs` dir.
|
You can create new file inside `./packs` dir.
|
||||||
|
|
||||||
Syntax is same as classic makefile with one important and necessary addition -- a comment started with `##`:
|
Syntax is same as classic makefile.
|
||||||
|
It is important to add a comment with short description:
|
||||||
|
|
||||||
```makefile
|
```makefile
|
||||||
##mypack1: Pack description
|
##mypack1: Pack description
|
||||||
@@ -63,7 +71,7 @@ mypack1: goal1 goal2 goalX ...
|
|||||||
...
|
...
|
||||||
|
|
||||||
##mypackX: Pack description
|
##mypackX: Pack description
|
||||||
mypackY: goalA goalB
|
mypackX: goalA goalB
|
||||||
@cp file1 file2
|
@cp file1 file2
|
||||||
...
|
...
|
||||||
...
|
...
|
||||||
@@ -72,3 +80,15 @@ mypackY: goalA goalB
|
|||||||
where:
|
where:
|
||||||
* `mypack*` is the pack name
|
* `mypack*` is the pack name
|
||||||
* `goal*` are script names in `./install`
|
* `goal*` are script names in `./install`
|
||||||
|
|
||||||
|
## 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)
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
[WTFPLv2](LICENSE)
|
||||||
|
|||||||
6
TODO.md
Normal file
6
TODO.md
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# Todo list
|
||||||
|
|
||||||
|
* [ ] tdesktop (https://desktop.telegram.org)
|
||||||
|
* [ ] spoofdpi (https://git.axenov.dev/mirrors/SpoofDPI/tags)
|
||||||
|
* [ ] lazynvim (https://www.lazyvim.org)
|
||||||
|
* [ ] ...
|
||||||
158
dotfiles/.bash_aliases
Normal file
158
dotfiles/.bash_aliases
Normal file
@@ -0,0 +1,158 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# alias bashrc='source ~/.bashrc'
|
||||||
|
alias zshrc='source ~/.zshrc'
|
||||||
|
alias realias='source ~/.bash_aliases'
|
||||||
|
alias reload='exec ${SHELL} -l'
|
||||||
|
alias sudo='sudo ' # enable aliases to be sudo’ed
|
||||||
|
alias g='git'
|
||||||
|
alias hosts="sudo nano /etc/hosts"
|
||||||
|
alias shrug="echo '¯\_(ツ)_/¯' | xclip -selection c"
|
||||||
|
|
||||||
|
alias ..='cd ..' # zsh builtin
|
||||||
|
alias ~='cd ~' # zsh builtin
|
||||||
|
alias -- -='cd -' # zsh builtin
|
||||||
|
|
||||||
|
alias chmod='chmod --preserve-root'
|
||||||
|
alias chown='chown --preserve-root'
|
||||||
|
|
||||||
|
alias free='free -h'
|
||||||
|
alias duh='du -ha --max-depth=1'
|
||||||
|
alias sduh='sudo du -ha --max-depth=1'
|
||||||
|
|
||||||
|
alias l='ls -pCFh --color=auto'
|
||||||
|
alias la='ls -pAFh --color=auto'
|
||||||
|
alias ll='ls -palFh --color=auto'
|
||||||
|
|
||||||
|
alias mkdir='mkdir -pv'
|
||||||
|
alias where='whereis' # zsh builtin
|
||||||
|
|
||||||
|
alias ps='ps auxf'
|
||||||
|
alias psg='ps aux | grep -v grep | grep -i -e VSZ -e'
|
||||||
|
|
||||||
|
alias is='type -a'
|
||||||
|
alias upgrade='sudo apt update && sudo apt upgrade -y && sudo snap refresh'
|
||||||
|
alias untargz='tar -czf'
|
||||||
|
alias mkcd="mkdir -p $1 && cd $1"
|
||||||
|
alias cl='cd $1 && ll'
|
||||||
|
alias myip='curl http://ipecho.net/plain; echo'
|
||||||
|
alias ports='netstat -tulpan'
|
||||||
|
|
||||||
|
alias ssh.pub='cat ~/.ssh/*.pub'
|
||||||
|
alias gpg.new="gpg --full-generate-key"
|
||||||
|
alias gpg.pub="gpg --armor --export $@"
|
||||||
|
alias gpg.list='gpg --list-keys --keyid-format SHORT'
|
||||||
|
|
||||||
|
alias lite-xl="LITE_SCALE=1 lite-xl"
|
||||||
|
alias wine='LANG=ru_RU.utf8 wine'
|
||||||
|
alias docker.prune='docker image prune -f; docker network prune -f; docker container prune -f'
|
||||||
|
|
||||||
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
|
# sleep 10; alert
|
||||||
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
|
|
||||||
|
# https://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
|
||||||
|
alias obscam="sudo modprobe v4l2loopback video_nr=2 card_label='OBS Virtual Camera'"
|
||||||
|
|
||||||
|
# Download music from Youtube or Youtube Music
|
||||||
|
# and save as top quality flac file without video
|
||||||
|
# Playlist and video/track URLs are supported
|
||||||
|
# Usage: $ ytm https://www.youtube.com/watch\?v=dQw4w9WgXcQ
|
||||||
|
# More info: https://github.com/ytdl-org/youtube-dl
|
||||||
|
ytm() {
|
||||||
|
youtube-dl \
|
||||||
|
--extract-audio \
|
||||||
|
--audio-format flac \
|
||||||
|
--audio-quality 0 \
|
||||||
|
--format bestaudio \
|
||||||
|
--write-info-json \
|
||||||
|
--output "${HOME}/Музыка/ytm/%(playlist_title)s/%(channel)s - %(title)s.%(ext)s" \
|
||||||
|
$@
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
docker.ip() {
|
||||||
|
if [ "$1" ]; then
|
||||||
|
if [ "$1" = "-a" ]; then
|
||||||
|
docker ps -aq \
|
||||||
|
| xargs -n 1 docker inspect --format '{{.Name}}{{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' \
|
||||||
|
| sed -e 's#^/##' \
|
||||||
|
| column -t
|
||||||
|
elif [ "$1" = "-c" ]; then
|
||||||
|
docker-compose ps -q \
|
||||||
|
| xargs -n 1 docker inspect --format '{{.Name}}{{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' \
|
||||||
|
| sed -e 's#^/##' \
|
||||||
|
| column -t
|
||||||
|
else
|
||||||
|
docker inspect --format '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' "$1"
|
||||||
|
docker port "$1"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
docker ps -q \
|
||||||
|
| xargs -n 1 docker inspect --format '{{.Name}}{{range .NetworkSettings.Networks}} {{.IPAddress}}{{end}}' \
|
||||||
|
| sed -e 's#^/##' \
|
||||||
|
| column -t
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#################################################################################
|
||||||
|
|
||||||
|
# $1 -- file/dir path
|
||||||
|
# $2 -- permissions (0644, 0755, etc)
|
||||||
|
# own() { #TODO refactor
|
||||||
|
# [ "$1" ] && PATH="${1/#\~/$HOME}" || {
|
||||||
|
# echo "Error (1): path not provided"
|
||||||
|
# }
|
||||||
|
# echo $PATH
|
||||||
|
|
||||||
|
# [ "$2" ] && PERM="$2" || {
|
||||||
|
# if [ -d $PATH ]; then
|
||||||
|
# PERM="0755"
|
||||||
|
# elif [ -f $PATH ]; then
|
||||||
|
# PERM="0644"
|
||||||
|
# else
|
||||||
|
# echo "Error (2): path not exists"
|
||||||
|
# fi;
|
||||||
|
# }
|
||||||
|
# echo $PERM
|
||||||
|
|
||||||
|
# sudo chmod $PERM -R --preserve-root $PATH
|
||||||
|
# sudo chown $USER. -R --preserve-root $PATH
|
||||||
|
# }
|
||||||
|
|
||||||
|
# function extract {
|
||||||
|
# if [ -z "$1" ]; then
|
||||||
|
# # display usage if no parameters given
|
||||||
|
# echo "Usage: extract <path/file_name>.<zip|rar|bz2|gz|tar|tbz2|tgz|Z|7z|xz|ex|tar.bz2|tar.gz|tar.xz>"
|
||||||
|
# echo " extract <path/file_name_1.ext> [path/file_name_2.ext] [path/file_name_3.ext]"
|
||||||
|
# return 1
|
||||||
|
# else
|
||||||
|
# for n in $@
|
||||||
|
# do
|
||||||
|
# if [ -f "$n" ] ; then
|
||||||
|
# case "${n%,}" in
|
||||||
|
# *.tar.bz2|*.tar.gz|*.tar.xz|*.tbz2|*.tgz|*.txz|*.tar)
|
||||||
|
# tar xvf "$n" ;;
|
||||||
|
# *.lzma) unlzma ./"$n" ;;
|
||||||
|
# *.bz2) bunzip2 ./"$n" ;;
|
||||||
|
# *.rar) unrar x -ad ./"$n" ;;
|
||||||
|
# *.gz) gunzip ./"$n" ;;
|
||||||
|
# *.zip) unzip ./"$n" ;;
|
||||||
|
# *.z) uncompress ./"$n" ;;
|
||||||
|
# *.7z|*.arj|*.cab|*.chm|*.deb|*.dmg|*.iso|*.lzh|*.msi|*.rpm|*.udf|*.wim|*.xar)
|
||||||
|
# 7z x ./"$n" ;;
|
||||||
|
# *.xz) unxz ./"$n" ;;
|
||||||
|
# *.exe) cabextract ./"$n" ;;
|
||||||
|
# *)
|
||||||
|
# echo "extract: '$n' - unknown archive method"
|
||||||
|
# return 1
|
||||||
|
# ;;
|
||||||
|
# esac
|
||||||
|
# else
|
||||||
|
# echo "'$n' - file does not exist"
|
||||||
|
# return 1
|
||||||
|
# fi
|
||||||
|
# done
|
||||||
|
# fi
|
||||||
|
# }
|
||||||
108
dotfiles/.bashrc
Normal file
108
dotfiles/.bashrc
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color|*-256color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
#force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# colored GCC warnings and errors
|
||||||
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
15
dotfiles/.editorconfig
Normal file
15
dotfiles/.editorconfig
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.{yml,yaml}]
|
||||||
|
indent_size = 2
|
||||||
151
dotfiles/.git_aliases
Normal file
151
dotfiles/.git_aliases
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
[alias]
|
||||||
|
a = "add"
|
||||||
|
aa = "add --all" # add all unstaged into index
|
||||||
|
aliases = "config --get-regexp '^alias'" # show all aliases
|
||||||
|
amend = "commit --amend --all --no-edit" # add new changes into last commit
|
||||||
|
amendm = "commit --amend --all --message" # amend + edit commit message
|
||||||
|
|
||||||
|
b = "branch" #
|
||||||
|
bm = "branch --merged" # branches whose tips are reachable from commit or HEAD
|
||||||
|
bnm = "branch --no-merged" # branches whose tips are NOT reachable from commit or HEAD
|
||||||
|
branches = "branch -a"
|
||||||
|
; branches = "bvv"
|
||||||
|
brd = "branch -D" # force delete unmerged branch
|
||||||
|
brod = "!git branch -D "$1"; git push origin :"$1";" # brd + remove it from origin
|
||||||
|
bv = "branch -v" # show branch list with those last commits
|
||||||
|
bvv = "branch -vv" # bv + remote branches tracked by them
|
||||||
|
|
||||||
|
c = "commit"
|
||||||
|
ca = "commit --all" # stage all changes and make a commit (interative)
|
||||||
|
cam = "commit --all --message" # ca + cm (non-interactive)
|
||||||
|
cf = "!f() { TARGET=$(git rev-parse \"$1\"); git commit --fixup=$TARGET && GIT_EDITOR=true git rebase --interactive --autosquash $TARGET~; }; f" # https://words.filippo.io/git-fixup-amending-an-older-commit/
|
||||||
|
cleaner = "clean -dff"
|
||||||
|
cleanest = "clean -dffx"
|
||||||
|
cleanout = "!git clean -df && git checkout -- ."
|
||||||
|
cloner = "clone --recursive" # clone with submodules
|
||||||
|
cm = "commit --message" # make a commit with message given (non-interactive)
|
||||||
|
co = "checkout"
|
||||||
|
cob = "checkout -b" # create new branch with name given
|
||||||
|
contributors = "shortlog --summary --numbered --no-merges" # users participating in development
|
||||||
|
cp = "cherry-pick"
|
||||||
|
cpa = "cherry-pick --abort" # abort cherry-picking
|
||||||
|
cpc = "cherry-pick --continue" # continue cherry-picking
|
||||||
|
cpn = "cherry-pick --no-commit" # cherry-pick without commit
|
||||||
|
; cpnx = "cherry-pick --no-commit -x"
|
||||||
|
current-branch = "branch --show-current" #rev-parse --abbrev-ref HEAD
|
||||||
|
|
||||||
|
d = "diff"
|
||||||
|
dc = "diff --cached" # show diff of staged files
|
||||||
|
default-branch = "config init.defaultBranch" # get default branch name
|
||||||
|
dehead = "!BR=$(git branch --show-current); if [ -n "$BR" ]; then echo $BR; else git describe --contains --all HEAD; fi;"
|
||||||
|
dev = "!git checkout dev && git pull" # quick switch on dev branch and update it
|
||||||
|
develop = "!git checkout develop && git pull" # quick switch on develop branch and update it
|
||||||
|
discard = "checkout --" # удаляет изменения в файле
|
||||||
|
dw = "diff --word-diff" # show word diff in unstaged files
|
||||||
|
dwc = "diff --word-diff --cached" # dc + dw
|
||||||
|
|
||||||
|
exec = "!exec"
|
||||||
|
|
||||||
|
f = "fetch"
|
||||||
|
fa = "fetch --all" # fetch branches from all remotes
|
||||||
|
fuck = "!git checkout $(git default-branch) && git fetch origin --prune && git reset --hard origin/$(git default-branch) && git clean -ffd"
|
||||||
|
|
||||||
|
guser = "config --global --get-regexp '^user'" # show global user settings
|
||||||
|
gzip = !"f() { top=$(rev-parse --show-toplevel); cd $top; tar cvzf $top.tar.gz $top ; }; f" # make repo .tar.gz
|
||||||
|
|
||||||
|
head = "log -1 HEAD" # показать последний коммит в текущей ветке
|
||||||
|
heads = "log --graph --decorate --simplify-by-decoration --oneline" # show last commit of each branch as tree graph
|
||||||
|
|
||||||
|
inbound = "!git remote update --prune; git log ..@{upstream}" # get
|
||||||
|
init = "init -q"
|
||||||
|
|
||||||
|
l = "log"
|
||||||
|
; last-tag = "describe --tags --abbrev=0"
|
||||||
|
; last-tagged = "!git describe --tags $(git rev-list --tags --max-count=1)"
|
||||||
|
lo = "log --oneline"
|
||||||
|
log-all = "log --graph --decorate --all"
|
||||||
|
log-my = "!git log --author $(git config user.email)"
|
||||||
|
log-small = "log --graph --decorate --all --pretty=format:'%C(bold red)%h%C(reset) %C(bold blue)%an%C(reset) %C(green)%cr%C(reset) [%aD]%d%n%B'"
|
||||||
|
|
||||||
|
m = "merge"
|
||||||
|
ma = "merge --abort" # abort merging
|
||||||
|
main = "!git checkout main && git pull" # quick switch on main branch and update it
|
||||||
|
master = "!git checkout master && git pull" # quick switch on master branch and update it
|
||||||
|
mc = "merge --continue" # continue merging
|
||||||
|
merged = "bm"
|
||||||
|
mn = "merge --no-commit" # merge without commit
|
||||||
|
|
||||||
|
optimizer = "!git pruner; git repacker; git prune-packed"
|
||||||
|
orphans = "fsck --full"
|
||||||
|
outbound = "log @{upstream}.."
|
||||||
|
|
||||||
|
p = "pull"
|
||||||
|
pf = "pull --force" # получить ветку принудительно
|
||||||
|
pft = "pull --force --tags" # получить теги
|
||||||
|
; ploh = "pull origin HEAD" # получить текущую ветку из origin
|
||||||
|
; pr = "!git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1" # github: встать на PR с указанным id
|
||||||
|
prs = "pull --recurse-submodules" # pull with submodules
|
||||||
|
pruner = "!git prune --expire=now; git reflog expire --expire-unreachable=now --rewrite --all"
|
||||||
|
pullf = "pull --force"
|
||||||
|
pullft = "pull --force --tags"
|
||||||
|
pullt = "pull --tags" # получить теги
|
||||||
|
pushf = "!git push --force" # отправить ветку принудительно
|
||||||
|
; pushf = "!git push --force --set-upstream origin $(git current-branch)" # отправить ветку принудительно
|
||||||
|
pushft = "!git push --tags --force" # отправить теги принудительно
|
||||||
|
; pushft = "!git push --tags --force --set-upstream origin $(git current-branch)" # отправить теги принудительно
|
||||||
|
pusht = "!git push --tags" # отправить теги
|
||||||
|
; pusht = "!git push --tags --set-upstream origin $(git current-branch)" # отправить теги
|
||||||
|
|
||||||
|
r = "reset"
|
||||||
|
rb = "rebase"
|
||||||
|
rba = "rebase --abort"
|
||||||
|
rbc = "rebase --continue"
|
||||||
|
rbi = "rebase --interactive"
|
||||||
|
rbs = "rebase --skip"
|
||||||
|
re = "remote"
|
||||||
|
rea = "remote add"
|
||||||
|
remotes = "remote -v" # показать список удалённых репозиториев
|
||||||
|
rep = "remote prune"
|
||||||
|
repacker = "repack -adf --depth=300 --window=300 --window-memory=1g"
|
||||||
|
repd = "remote prune --dry-run"
|
||||||
|
repo = "rpo"
|
||||||
|
repod = "rpod"
|
||||||
|
repush = "!git push origin :$1 && git push origin $1'" # замена push --force
|
||||||
|
res = "remote show"
|
||||||
|
reso = "remote show origin"
|
||||||
|
reu = "remote update"
|
||||||
|
rev = "remote -v"
|
||||||
|
rh = "reset --hard" # откат коммита с удалением всех изменений на указанный коммит
|
||||||
|
rhh = "reset --hard HEAD" # откат коммита с удалением всех изменений на последний коммит
|
||||||
|
rpo = "remote prune origin" # удалить все мёртвые ссылки на bare-ветки origin
|
||||||
|
rpod = "rpo --dry-run" # удалить все мёртвые ссылки на bare-ветки origin
|
||||||
|
rs = "reset --soft" # откат коммита с сохранением всех изменений на указанный коммит
|
||||||
|
rsh = "reset --soft HEAD" # откат коммита с сохранением всех изменений
|
||||||
|
rso = "remote show origin" # показать состояние локальных веток относительно удалённых на origin bare
|
||||||
|
rv = "revert"
|
||||||
|
rvn = "revert --no-commit"
|
||||||
|
|
||||||
|
s = "status"
|
||||||
|
sb = "show-branch"
|
||||||
|
start = "!git init -q && git commit --allow-empty -m 'Initial commit'"
|
||||||
|
stashes = "stash list" # show stashed changes
|
||||||
|
sub = "submodule"
|
||||||
|
; sa = "submodule add"
|
||||||
|
; sdi = "submodule deinit -f"
|
||||||
|
; si = "submodule init"
|
||||||
|
; ss = "submodule summary"
|
||||||
|
; sst = "submodule status"
|
||||||
|
; sup = "submodule update"
|
||||||
|
; sy = "remote update origin --prune"
|
||||||
|
|
||||||
|
tags = "tag -n1 --list" # shot tag names and commit message
|
||||||
|
trim = "!DEFAULT=$(git default-branch); git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; git remote prune origin;"
|
||||||
|
|
||||||
|
uncommit = "rs HEAD~1"
|
||||||
|
unstage = "reset HEAD" # staged file => unstaged
|
||||||
|
;unwip = "reset --mixed HEAD~"
|
||||||
|
upstream-branch = "!git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)"
|
||||||
|
user = "config --local --get-regexp '^user'" # show local user settings (in current repo)
|
||||||
|
|
||||||
|
wip = "!git add . && git commit -am 'WIP'"
|
||||||
|
wipa = "!git add . && git commit --amend -am 'WIP'"
|
||||||
28
dotfiles/.gitconfig
Normal file
28
dotfiles/.gitconfig
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
[core]
|
||||||
|
editor = nano
|
||||||
|
autocrlf = input
|
||||||
|
[user]
|
||||||
|
# ...
|
||||||
|
# signingkey = <key>
|
||||||
|
# git config user.signingkey ... -- установить ключ
|
||||||
|
# https://help.github.com/articles/signing-commits-using-gpg/
|
||||||
|
[commit]
|
||||||
|
gpgSign = true
|
||||||
|
[tag]
|
||||||
|
gpgSign = true
|
||||||
|
[init]
|
||||||
|
defaultBranch = master
|
||||||
|
[push]
|
||||||
|
default = current
|
||||||
|
followTags = true
|
||||||
|
[pull]
|
||||||
|
default = current
|
||||||
|
rebase = false
|
||||||
|
[diff "bin"]
|
||||||
|
textconv = hexdump -v -C
|
||||||
|
[help]
|
||||||
|
autocorrect = 1
|
||||||
|
[remote "origin"]
|
||||||
|
prune = true
|
||||||
|
[include]
|
||||||
|
path = ~/.git_aliases
|
||||||
4
dotfiles/.gitignore
vendored
Normal file
4
dotfiles/.gitignore
vendored
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.DS_Store
|
||||||
|
Desktop.ini
|
||||||
|
._*
|
||||||
|
Thumbs.db
|
||||||
53
dotfiles/.profile
Normal file
53
dotfiles/.profile
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# ~/.profile: executed by the command interpreter for login shells.
|
||||||
|
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||||
|
# exists.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||||
|
# the files are located in the bash-doc package.
|
||||||
|
|
||||||
|
# the default umask is set in /etc/profile; for setting the umask
|
||||||
|
# for ssh logins, install and configure the libpam-umask package.
|
||||||
|
#umask 022
|
||||||
|
|
||||||
|
# if running bash
|
||||||
|
if [ -n "$BASH_VERSION" ]; then
|
||||||
|
# include .bashrc if it exists
|
||||||
|
if [ -f "$HOME/.bashrc" ]; then
|
||||||
|
. "$HOME/.bashrc"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set PATH so it includes user's private bin if it exists
|
||||||
|
if [ -d "$HOME/bin" ] ; then
|
||||||
|
PATH="$HOME/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set PATH so it includes user's private bin if it exists
|
||||||
|
if [ -d "$HOME/.local/bin" ] ; then
|
||||||
|
PATH="$HOME/.local/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
### AAA ##########################################
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
export LD_LIBRARY_PATH="/opt/oci"
|
||||||
|
# export NLS_LANG='RUSSIAN_RUSSIA.AL32UTF8'
|
||||||
|
# export NLS_DATE_FORMAT='DD.MM.YYYY'
|
||||||
|
# export NLS_CURRENCY='р.'
|
||||||
|
# export NLS_DUAL_CURRENCY='р.'
|
||||||
|
# export NLS_CALENDAR='GREGORIAN'
|
||||||
|
# export NLS_ISO_CURRENCY='RUSSIA'
|
||||||
|
|
||||||
|
export JAVA_HOME="/usr/bin/"
|
||||||
|
export ANDROID_SDK_ROOT="$HOME/android/sdk"
|
||||||
|
export LITE_SCALE=1 # workaround https://github.com/lite-xl/lite-xl/issues/1173
|
||||||
|
|
||||||
|
export PATH="$HOME/.local/share/JetBrains/Toolbox/scripts:$HOME/.config/composer/vendor/bin:$PATH"
|
||||||
|
|
||||||
|
# The next line updates PATH for Yandex Cloud CLI.
|
||||||
|
if [ -f "$HOME/yandex-cloud/path.bash.inc" ]; then source "$HOME/yandex-cloud/path.bash.inc"; fi
|
||||||
|
|
||||||
|
# The next line enables shell command completion for yc.
|
||||||
|
if [ -f "$HOME/yandex-cloud/completion.zsh.inc" ]; then source "$HOME/yandex-cloud/completion.zsh.inc"; fi
|
||||||
114
dotfiles/.zshrc
Normal file
114
dotfiles/.zshrc
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
|
||||||
|
# Initialization code that may require console input (password prompts, [y/n]
|
||||||
|
# confirmations, etc.) must go above this block; everything else may go below.
|
||||||
|
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
|
||||||
|
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If you come from bash you might have to change your $PATH.
|
||||||
|
# export PATH=$HOME/bin:/usr/local/bin:$PATH
|
||||||
|
|
||||||
|
# Path to your oh-my-zsh installation.
|
||||||
|
export ZSH="$HOME/.oh-my-zsh"
|
||||||
|
|
||||||
|
# Set name of the theme to load --- if set to "random", it will
|
||||||
|
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||||
|
# to know which specific one was loaded, run: echo $RANDOM_THEME
|
||||||
|
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
|
||||||
|
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||||
|
|
||||||
|
# Set list of themes to pick from when loading at random
|
||||||
|
# Setting this variable when ZSH_THEME=random will cause zsh to load
|
||||||
|
# a theme from this variable instead of looking in $ZSH/themes/
|
||||||
|
# If set to an empty array, this variable will have no effect.
|
||||||
|
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
|
||||||
|
|
||||||
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
|
# CASE_SENSITIVE="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to use hyphen-insensitive completion.
|
||||||
|
# Case-sensitive completion must be off. _ and - will be interchangeable.
|
||||||
|
# HYPHEN_INSENSITIVE="true"
|
||||||
|
|
||||||
|
# Uncomment one of the following lines to change the auto-update behavior
|
||||||
|
# zstyle ':omz:update' mode disabled # disable automatic updates
|
||||||
|
# zstyle ':omz:update' mode auto # update automatically without asking
|
||||||
|
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
|
||||||
|
|
||||||
|
# Uncomment the following line to change how often to auto-update (in days).
|
||||||
|
# zstyle ':omz:update' frequency 13
|
||||||
|
|
||||||
|
# Uncomment the following line if pasting URLs and other text is messed up.
|
||||||
|
# DISABLE_MAGIC_FUNCTIONS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to disable colors in ls.
|
||||||
|
# DISABLE_LS_COLORS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to disable auto-setting terminal title.
|
||||||
|
# DISABLE_AUTO_TITLE="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to enable command auto-correction.
|
||||||
|
# ENABLE_CORRECTION="true"
|
||||||
|
|
||||||
|
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||||
|
# You can also set it to another string to have that shown instead of the default red dots.
|
||||||
|
# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f"
|
||||||
|
# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765)
|
||||||
|
# COMPLETION_WAITING_DOTS="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to disable marking untracked files
|
||||||
|
# under VCS as dirty. This makes repository status check for large repositories
|
||||||
|
# much, much faster.
|
||||||
|
# DISABLE_UNTRACKED_FILES_DIRTY="true"
|
||||||
|
|
||||||
|
# Uncomment the following line if you want to change the command execution time
|
||||||
|
# stamp shown in the history command output.
|
||||||
|
# You can set one of the optional three formats:
|
||||||
|
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
|
# or set a custom format using the strftime function format specifications,
|
||||||
|
# see 'man strftime' for details.
|
||||||
|
# HIST_STAMPS="mm/dd/yyyy"
|
||||||
|
|
||||||
|
# Would you like to use another custom folder than $ZSH/custom?
|
||||||
|
# ZSH_CUSTOM=/path/to/new-custom-folder
|
||||||
|
|
||||||
|
# Which plugins would you like to load?
|
||||||
|
# Standard plugins can be found in $ZSH/plugins/
|
||||||
|
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
|
||||||
|
# Example format: plugins=(rails git textmate ruby lighthouse)
|
||||||
|
# Add wisely, as too many plugins slow down shell startup.
|
||||||
|
plugins=(git docker docker-compose composer zsh-autosuggestions zsh-syntax-highlighting)
|
||||||
|
# plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
||||||
|
|
||||||
|
source $ZSH/oh-my-zsh.sh
|
||||||
|
|
||||||
|
# User configuration
|
||||||
|
|
||||||
|
# export MANPATH="/usr/local/man:$MANPATH"
|
||||||
|
|
||||||
|
# You may need to manually set your language environment
|
||||||
|
# export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
# Preferred editor for local and remote sessions
|
||||||
|
# if [[ -n $SSH_CONNECTION ]]; then
|
||||||
|
# export EDITOR='vim'
|
||||||
|
# else
|
||||||
|
# export EDITOR='mvim'
|
||||||
|
# fi
|
||||||
|
|
||||||
|
# Compilation flags
|
||||||
|
# export ARCHFLAGS="-arch x86_64"
|
||||||
|
|
||||||
|
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||||
|
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||||
|
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||||
|
# For a full list of active aliases, run `alias`.
|
||||||
|
#
|
||||||
|
# Example aliases
|
||||||
|
# alias zshconfig="mate ~/.zshrc"
|
||||||
|
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||||
|
|
||||||
|
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||||
|
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||||
|
|
||||||
|
[[ -f ~/.profile ]] && source ~/.profile
|
||||||
2
dotfiles/README
Normal file
2
dotfiles/README
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
This directory contains files whose names start with a dot.
|
||||||
|
Make sure your file manager displays them here.
|
||||||
11
dotfiles/etc/docker/daemon.json
Normal file
11
dotfiles/etc/docker/daemon.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"registry-mirrors": [
|
||||||
|
"https://dockerhub.timeweb.cloud",
|
||||||
|
"https://dh-mirror.gitverse.ru",
|
||||||
|
"https://mirror.gcr.io",
|
||||||
|
"https://daocloud.io",
|
||||||
|
"https://c.163.com/",
|
||||||
|
"https://registry.docker-cn.com",
|
||||||
|
"https://huecker.io"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing flatpak and its software..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
sudo apt install -y --autoremove \
|
|
||||||
flatpak \
|
|
||||||
gnome-software-plugin-flatpak
|
|
||||||
|
|
||||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
|
||||||
@@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing oci8..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
# https://www.oracle.com/cis/database/technologies/instant-client/downloads.html
|
|
||||||
|
|
||||||
#check for
|
|
||||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip
|
|
||||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -- only libociicus.so
|
|
||||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
|
|
||||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-tools-linuxx64.zip
|
|
||||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
|
|
||||||
#unzip
|
|
||||||
|
|
||||||
sudo mkdir /opt/oracle/
|
|
||||||
sudo mv ~/Downloads/instant_client/ /opt/oracle/
|
|
||||||
|
|
||||||
sudo sh -c "echo /opt/oracle/instant_client > /etc/ld.so.conf.d/oracle-instantclient.conf"
|
|
||||||
sudo ldconfig
|
|
||||||
|
|
||||||
sudo apt install -y --autoremove \
|
|
||||||
php-dev \
|
|
||||||
php-pear \
|
|
||||||
build-essential \
|
|
||||||
libaio1 \
|
|
||||||
default-jdk
|
|
||||||
sudo pecl channel-update pecl.php.net
|
|
||||||
sudo pecl install oci8 # php8
|
|
||||||
#sudo pecl install oci8-2.2.0 # php7
|
|
||||||
|
|
||||||
#sh -c "echo '; priority=10' > /etc/php/7.4/mods-available/oci8.ini"
|
|
||||||
# sudo sh -c "echo 'extension=oci8.so' >> /etc/php/7.4/mods-available/oci8.ini"
|
|
||||||
# sudo chmod 0644 /etc/php/7.4/mods-available/oci8.ini
|
|
||||||
sudo phpenmod oci8
|
|
||||||
php -i | grep oci8
|
|
||||||
|
|
||||||
# instantclient,/opt/oracle/instant_client
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# https://pecl.php.net/package/oci8
|
|
||||||
#sudo pecl install oci8-2.2.0
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing phpstorm-url-handler..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
installed() {
|
|
||||||
command -v "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
# https://github.com/rozwell/phpstorm-url-handler/
|
|
||||||
# https://askubuntu.com/a/1023143
|
|
||||||
# https://askubuntu.com/a/919825
|
|
||||||
# https://medium.com/swlh/custom-protocol-handling-how-to-8ac41ff651eb
|
|
||||||
# https://www.linuxquestions.org/questions/linux-desktop-74/xdg-open-doesn%27t-recognize-custom-protocol-4175433062/#post4809984
|
|
||||||
|
|
||||||
sudo rm -rf /usr/bin/phpstorm-url-handler >/dev/null
|
|
||||||
sudo rm -rf ~/.local/share/applications/phpstorm-url-handler.desktop >/dev/null
|
|
||||||
sudo rm -rf /usr/share/applications/phpstorm-url-handler.desktop >/dev/null
|
|
||||||
if installed "git"; then
|
|
||||||
sudo git clone https://github.com/rozwell/phpstorm-url-handler.git /usr/src/phpstorm-url-handler
|
|
||||||
else
|
|
||||||
sudo wget https://github.com/rozwell/phpstorm-url-handler/archive/master.zip -O /tmp/phpstorm-url-handler.zip
|
|
||||||
sudo unzip /tmp/phpstorm-url-handler.zip -d /usr/src/phpstorm-url-handler
|
|
||||||
sudo rm -f /tmp/phpstorm-url-handler.zip
|
|
||||||
fi
|
|
||||||
|
|
||||||
info "Copy .desktop"
|
|
||||||
sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler.desktop /usr/share/local/applications/phpstorm-url-handler.desktop
|
|
||||||
|
|
||||||
info "Symlink bin"
|
|
||||||
sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler /usr/bin/phpstorm-url-handler
|
|
||||||
|
|
||||||
info "desktop-file-install"
|
|
||||||
sudo desktop-file-install phpstorm-url-handler.desktop
|
|
||||||
|
|
||||||
info "update-desktop-database"
|
|
||||||
sudo update-desktop-database -v 2>&1 | grep -E "^(.+)\/phpstorm-url-handler.desktop(.+)$"
|
|
||||||
|
|
||||||
info "xdg-mime"
|
|
||||||
xdg-mime default phpstorm-url-handler.desktop x-scheme-handler/phpstorm
|
|
||||||
@@ -1,46 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing samp-server v03svr_R2-1..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
# https://sampwiki.blast.hk/wiki/Linux_Server
|
|
||||||
# https://team.sa-mp.com/wiki/Server.cfg_RU.html
|
|
||||||
|
|
||||||
cd $HOME
|
|
||||||
wget -qO - https://files.sa-mp.com/samp03svr_R2-1.tar.gz | tar -zxf -
|
|
||||||
# sudo dpkg --add-architecture i386
|
|
||||||
# sudo apt update
|
|
||||||
# sudo apt install -y libc6:i386
|
|
||||||
apt-get install ia32-libs
|
|
||||||
|
|
||||||
echo "echo Executing Server Config...
|
|
||||||
lanmode 0
|
|
||||||
rcon 1
|
|
||||||
language Russian
|
|
||||||
rcon_password bootsector
|
|
||||||
maxplayers 50
|
|
||||||
port 7777
|
|
||||||
hostname My Server
|
|
||||||
gamemode0 bare 1
|
|
||||||
filterscripts base gl_actions gl_property gl_realtime
|
|
||||||
announce 1
|
|
||||||
query 1
|
|
||||||
weburl
|
|
||||||
maxnpc 0
|
|
||||||
onfoot_rate 40
|
|
||||||
incar_rate 40
|
|
||||||
weapon_rate 40
|
|
||||||
stream_distance 800.0
|
|
||||||
stream_rate 1000
|
|
||||||
timestamp 1
|
|
||||||
output 0
|
|
||||||
" > $HOME/samp03/server.cfg
|
|
||||||
|
|
||||||
ln -s $HOME/samp03/samp03svr /usr/local/bin/samp
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Success! Now run via 'samp &'"
|
|
||||||
echo
|
|
||||||
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing wkhtmltopdf..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
# не тестировалось
|
|
||||||
|
|
||||||
wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb" -O /tmp/wkhtmltopdf.deb
|
|
||||||
sudo dpkg -i /tmp/wkhtmltopdf.deb
|
|
||||||
rm /tmp/wkhtmltopdf.deb
|
|
||||||
95
gen-makefile
Executable file
95
gen-makefile
Executable file
@@ -0,0 +1,95 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
[ -f Makefile ] && mv Makefile Makefile.bak
|
||||||
|
CHR_UPGRADE='^'
|
||||||
|
CHR_UNINSTALL='/'
|
||||||
|
|
||||||
|
cat << EOF > Makefile
|
||||||
|
# Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]}
|
||||||
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
|
#===============================================
|
||||||
|
# Scripts listed in ./install
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for file in ./install/*; do
|
||||||
|
name=${file##*/}
|
||||||
|
name=${name%.sh}
|
||||||
|
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
|
||||||
|
[ -z "$desc" ] && desc='<no description>'
|
||||||
|
echo -e "##${name}: ${desc}\n${name}:\n\t@${file}\n" >> Makefile
|
||||||
|
done;
|
||||||
|
|
||||||
|
cat << EOF >> Makefile
|
||||||
|
|
||||||
|
#===============================================
|
||||||
|
# Scripts listed in ./packs
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for file in ./packs/*; do
|
||||||
|
cat "$file" >> Makefile
|
||||||
|
echo >> Makefile
|
||||||
|
done;
|
||||||
|
|
||||||
|
|
||||||
|
cat << EOF >> Makefile
|
||||||
|
#===============================================
|
||||||
|
# Scripts listed in ./upgrade
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for file in ./upgrade/*; do
|
||||||
|
name=${file##*/}
|
||||||
|
name=${name%.sh}
|
||||||
|
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
|
||||||
|
[ -z "$desc" ] && desc='<no description>'
|
||||||
|
echo -e "##${CHR_UPGRADE}${name}: ${desc}\n${CHR_UPGRADE}${name}:\n\t@${file}\n" >> Makefile
|
||||||
|
done;
|
||||||
|
|
||||||
|
cat << EOF >> Makefile
|
||||||
|
#===============================================
|
||||||
|
# Scripts listed in ./uninstall
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
for file in ./uninstall/*; do
|
||||||
|
name=${file##*/}
|
||||||
|
name=${name%.sh}
|
||||||
|
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
|
||||||
|
[ -z "$desc" ] && desc='<no description>'
|
||||||
|
echo -e "##${CHR_UNINSTALL}${name}: ${desc}\n${CHR_UNINSTALL}${name}:\n\t@${file}\n" >> Makefile
|
||||||
|
done;
|
||||||
|
|
||||||
|
cat << EOF >> Makefile
|
||||||
|
#===============================================
|
||||||
|
# Service goals
|
||||||
|
#===============================================
|
||||||
|
|
||||||
|
self:
|
||||||
|
@./gen-makefile
|
||||||
|
help: Makefile
|
||||||
|
@echo "Ubuntu software installator"
|
||||||
|
@echo
|
||||||
|
@echo "Usage:"
|
||||||
|
@echo "\tmake help\t - show this help"
|
||||||
|
@echo "\tmake self\t - regenerate Makefile (alias of ./gen-makefile)"
|
||||||
|
@echo "\tmake GOAL\t - install software"
|
||||||
|
@echo "\tmake ${CHR_UPGRADE}GOAL\t - upgrade software"
|
||||||
|
@echo "\tmake ${CHR_UNINSTALL}GOAL\t - uninstall software"
|
||||||
|
@echo "\nYou can combine GOALs, here are some examples:"
|
||||||
|
@echo "\tmake ${CHR_UNINSTALL}docker docker"
|
||||||
|
@echo "\tmake php ${CHR_UNINSTALL}docker ${CHR_UPGRADE}omz"
|
||||||
|
@echo "\nAvailable GOALs:"
|
||||||
|
@sed -n 's/^##//p' $< | column -ts ':' | sed -e "s/^/\t/"
|
||||||
|
+%:
|
||||||
|
@make $*
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "New ./Makefile has been generated!"
|
||||||
|
echo "Old one has been saved as ./Makefile.bak"
|
||||||
|
echo "Now run 'make' to get help"
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
mv Makefile Makefile.bak
|
|
||||||
echo -e "# Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]}\n" > Makefile
|
|
||||||
|
|
||||||
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='<no description>'
|
|
||||||
echo -e "##${name}: ${desc}\n${name}:\n\t${file}\n" >> Makefile
|
|
||||||
done;
|
|
||||||
|
|
||||||
cat << EOF >> Makefile
|
|
||||||
##help: Show this help message
|
|
||||||
help: Makefile
|
|
||||||
@echo "Usage:"
|
|
||||||
@echo "\tmake <goal>\n"
|
|
||||||
@echo "Available goals:"
|
|
||||||
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/"
|
|
||||||
|
|
||||||
##<goal>_: Same as 'cat ./install/<goal>.sh'
|
|
||||||
%_:
|
|
||||||
@cat ./install/\$*.sh
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
|
||||||
echo "New ./Makefile has been generated!"
|
|
||||||
echo "Old one has been saved as ./Makefile.bak"
|
|
||||||
echo
|
|
||||||
make help
|
|
||||||
224
helpers
Normal file
224
helpers
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
installed2() {
|
||||||
|
dpkg --list | grep -qw "ii $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
apt_install() {
|
||||||
|
sudo apt install -y --autoremove $*
|
||||||
|
}
|
||||||
|
|
||||||
|
require() {
|
||||||
|
sw=()
|
||||||
|
for package in "$@"; do
|
||||||
|
if ! installed "$package" && ! installed2 "$package"; then
|
||||||
|
sw+=("$package")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ ${#sw[@]} -gt 0 ]; then
|
||||||
|
info "This packages will be installed in your system:\n${sw[*]}"
|
||||||
|
apt_install ${sw[*]}
|
||||||
|
[ $? -gt 0 ] && die "installation cancelled" 201
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
require2() {
|
||||||
|
sw=()
|
||||||
|
for package in "$@"; do
|
||||||
|
if ! installed "$package" && ! installed2 "$package"; then
|
||||||
|
sw+=("$package")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
if [ ${#sw[@]} -gt 0 ]; then
|
||||||
|
die "This packages must be installed in your system:\n${sw[*]}" 200
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
title() {
|
||||||
|
[ "$1" ] && title="$1" || title="$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${BASH_SOURCE[1]})"
|
||||||
|
info
|
||||||
|
info "==============================================="
|
||||||
|
info "$title"
|
||||||
|
info "==============================================="
|
||||||
|
info
|
||||||
|
}
|
||||||
|
|
||||||
|
unpak_targz() {
|
||||||
|
require tar
|
||||||
|
tar -xzf "$1" -C "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
symlink() {
|
||||||
|
ln -sf "$1" "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
download() {
|
||||||
|
require wget
|
||||||
|
wget "$1" -O "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
clone() {
|
||||||
|
require git
|
||||||
|
git clone $*
|
||||||
|
}
|
||||||
|
|
||||||
|
clone_quick() {
|
||||||
|
require git
|
||||||
|
git clone $* --depth=1 --single-branch
|
||||||
|
}
|
||||||
|
|
||||||
|
abspath() {
|
||||||
|
echo $(realpath -q "${1/#\~/$HOME}")
|
||||||
|
}
|
||||||
|
|
||||||
|
is_writable() {
|
||||||
|
[ -w "$(abspath $1)" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
is_dir() {
|
||||||
|
[ -d "$(abspath $1)" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
is_file() {
|
||||||
|
[ -f "$(abspath $1)" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
is_function() {
|
||||||
|
declare -F "$1" > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
regex_match() {
|
||||||
|
printf "%s" "$1" | grep -qP "$2"
|
||||||
|
}
|
||||||
|
|
||||||
|
in_array() {
|
||||||
|
local find=$1
|
||||||
|
shift
|
||||||
|
for e in "$@"; do
|
||||||
|
[[ "$e" == "$find" ]] && return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
implode() {
|
||||||
|
local d=${1-}
|
||||||
|
local f=${2-}
|
||||||
|
if shift 2; then
|
||||||
|
printf %s "$f" "${@/#/$d}"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
IINFO="( i )"
|
||||||
|
INOTE="( * )"
|
||||||
|
IWARN="( # )"
|
||||||
|
IERROR="( ! )"
|
||||||
|
IFATAL="( @ )"
|
||||||
|
ISUCCESS="( ! )"
|
||||||
|
IASK="( ? )"
|
||||||
|
IDEBUG="(DBG)"
|
||||||
|
IVRB="( + )"
|
||||||
|
|
||||||
|
BOLD="\e[1m"
|
||||||
|
DIM="\e[2m"
|
||||||
|
NOTBOLD="\e[22m" # sometimes \e[21m
|
||||||
|
NOTDIM="\e[22m"
|
||||||
|
NORMAL="\e[20m"
|
||||||
|
RESET="\e[0m"
|
||||||
|
|
||||||
|
FRESET="\e[39m"
|
||||||
|
FBLACK="\e[30m"
|
||||||
|
FWHITE="\e[97m"
|
||||||
|
FRED="\e[31m"
|
||||||
|
FGREEN="\e[32m"
|
||||||
|
FYELLOW="\e[33m"
|
||||||
|
FBLUE="\e[34m"
|
||||||
|
FLRED="\e[91m"
|
||||||
|
FLGREEN="\e[92m"
|
||||||
|
FLYELLOW="\e[93m"
|
||||||
|
FLBLUE="\e[94m"
|
||||||
|
|
||||||
|
BRESET="\e[49m"
|
||||||
|
BBLACK="\e[40m"
|
||||||
|
BWHITE="\e[107m"
|
||||||
|
BRED="\e[41m"
|
||||||
|
BGREEN="\e[42m"
|
||||||
|
BYELLOW="\e[43m"
|
||||||
|
BBLUE="\e[44m"
|
||||||
|
BLRED="\e[101m"
|
||||||
|
BLGREEN="\e[102m"
|
||||||
|
BLYELLOW="\e[103m"
|
||||||
|
BLBLUE="\e[104m"
|
||||||
|
|
||||||
|
dt() {
|
||||||
|
echo "[$(date +'%H:%M:%S')] "
|
||||||
|
}
|
||||||
|
|
||||||
|
ask() {
|
||||||
|
IFS= read -rp "$(print ${BOLD}${BBLUE}${FWHITE}${IASK}${BRESET}\ ${BOLD}$1 ): " $2
|
||||||
|
}
|
||||||
|
|
||||||
|
print() {
|
||||||
|
echo -e "$*${RESET}"
|
||||||
|
}
|
||||||
|
|
||||||
|
debug() {
|
||||||
|
if [ "$2" ]; then
|
||||||
|
print "${DIM}${BOLD}${RESET}${DIM}${FUNCNAME[1]:-?}():${BASH_LINENO:-?}\t$1 "
|
||||||
|
else
|
||||||
|
print "${DIM}${BOLD}${RESET}${DIM}$1 "
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
verbose() {
|
||||||
|
print "${BOLD}${IVRB}${RESET}${FYELLOW} $1 "
|
||||||
|
}
|
||||||
|
|
||||||
|
info() {
|
||||||
|
print "${BOLD}${FWHITE}${BLBLUE}${IINFO}${RESET}${FWHITE} $1 "
|
||||||
|
}
|
||||||
|
|
||||||
|
note() {
|
||||||
|
print "${BOLD}${DIM}${FWHITE}${INOTE}${RESET} $1 "
|
||||||
|
}
|
||||||
|
|
||||||
|
success() {
|
||||||
|
print "${BOLD}${BGREEN}${FWHITE}${ISUCCESS}${BRESET}$FGREEN $1 "
|
||||||
|
}
|
||||||
|
|
||||||
|
warn() {
|
||||||
|
print "${BOLD}${BYELLOW}${FBLACK}${IWARN}${BRESET}${FYELLOW} Warning:${RESET} $1 "
|
||||||
|
}
|
||||||
|
|
||||||
|
error() {
|
||||||
|
print "${BOLD}${BLRED}${FWHITE}${IERROR} Error: ${BRESET}${FLRED} $1 " >&2
|
||||||
|
}
|
||||||
|
|
||||||
|
fatal() {
|
||||||
|
print "${BOLD}${BRED}${FWHITE}${IFATAL} FATAL: $1 " >&2
|
||||||
|
print_stacktrace
|
||||||
|
}
|
||||||
|
|
||||||
|
die() {
|
||||||
|
error "${1:-halted}"
|
||||||
|
exit ${2:-100}
|
||||||
|
}
|
||||||
|
|
||||||
|
print_stacktrace() {
|
||||||
|
STACK=""
|
||||||
|
local i
|
||||||
|
local stack_size=${#FUNCNAME[@]}
|
||||||
|
debug "Callstack:"
|
||||||
|
# for (( i=$stack_size-1; i>=1; i-- )); do
|
||||||
|
for (( i=1; i<$stack_size; i++ )); do
|
||||||
|
local func="${FUNCNAME[$i]}"
|
||||||
|
[ x$func = x ] && func=MAIN
|
||||||
|
local linen="${BASH_LINENO[$(( i - 1 ))]}"
|
||||||
|
local src="${BASH_SOURCE[$i]}"
|
||||||
|
[ x"$src" = x ] && src=non_file_source
|
||||||
|
debug " at $func $src:$linen"
|
||||||
|
done
|
||||||
|
}
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
##makedesc: Install apache2 (latest)
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing apache2..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
sudo apt install -y --autoremove apache2
|
|
||||||
sudo service apache2 restart
|
|
||||||
apache2 -v
|
|
||||||
15
install/apache2
Executable file
15
install/apache2
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install apache2 (latest)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
sudo apt install -y --autoremove apache2 && \
|
||||||
|
sudo systemctl restart apache2
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "apache2 installed!"
|
||||||
|
apache2 -v
|
||||||
|
echo
|
||||||
|
}
|
||||||
87
install/apt
87
install/apt
@@ -1,60 +1,59 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install bunch of software from apt
|
##makedesc: Install software from apt
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
echo
|
title
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing software from apt..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
sudo apt update && sudo apt upgrade -y --autoremove
|
sudo apt update && \
|
||||||
sudo apt install -y --autoremove \
|
sudo apt upgrade -y --autoremove && \
|
||||||
|
sudo apt install -y \
|
||||||
|
alien \
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
ca-certificates \
|
|
||||||
curl \
|
|
||||||
make \
|
|
||||||
cmake \
|
|
||||||
dialog \
|
|
||||||
build-essential \
|
build-essential \
|
||||||
software-properties-common \
|
ca-certificates \
|
||||||
libaio1 \
|
cmake \
|
||||||
libssl-dev \
|
curl \
|
||||||
libghc-zlib-dev \
|
dconf-editor \
|
||||||
libcurl4-gnutls-dev \
|
default-jdk \
|
||||||
libexpat1-dev \
|
dialog \
|
||||||
gettext \
|
gettext \
|
||||||
gnupg \
|
gnupg \
|
||||||
ubuntu-restricted-extras \
|
|
||||||
unzip \
|
|
||||||
mc \
|
|
||||||
htop \
|
|
||||||
nano \
|
|
||||||
neofetch \
|
|
||||||
default-jdk \
|
|
||||||
terminator \
|
|
||||||
dconf-editor \
|
|
||||||
alien \
|
|
||||||
meld \
|
|
||||||
vlc \
|
|
||||||
gparted \
|
gparted \
|
||||||
hardinfo \
|
hardinfo \
|
||||||
libreoffice \
|
htop \
|
||||||
pulseeffects \
|
libaio1 \
|
||||||
lsp-plugins \
|
libcurl4-gnutls-dev \
|
||||||
|
libexpat1-dev \
|
||||||
|
libghc-zlib-dev \
|
||||||
|
libssl-dev \
|
||||||
lsb-release \
|
lsb-release \
|
||||||
|
lsp-plugins \
|
||||||
|
make \
|
||||||
|
mc \
|
||||||
|
meld \
|
||||||
|
nano \
|
||||||
|
neofetch \
|
||||||
net-tools \
|
net-tools \
|
||||||
nmap \
|
nmap \
|
||||||
p7zip-full \
|
p7zip-full \
|
||||||
sqlitebrowser
|
pulseeffects \
|
||||||
|
software-properties-common \
|
||||||
|
terminator \
|
||||||
|
ubuntu-restricted-extras \
|
||||||
|
unzip \
|
||||||
|
vlc \
|
||||||
|
ffmpeg \
|
||||||
|
xclip \
|
||||||
|
inotify-tools \
|
||||||
|
notify-osd \
|
||||||
|
fonts-open-sans \
|
||||||
|
libnotify-bin \
|
||||||
|
tree \
|
||||||
|
earlyoom
|
||||||
|
# sqlitebrowser
|
||||||
|
# etckeeper \
|
||||||
|
# geoclue-2.0 \
|
||||||
# gnome-software \
|
# gnome-software \
|
||||||
# minder \
|
# minder \
|
||||||
# redshift \
|
# redshift \
|
||||||
# redshift-gtk \
|
# redshift-gtk
|
||||||
# nodejs \
|
|
||||||
# compiz \
|
|
||||||
# compizconfig-settings-manager \
|
|
||||||
# earlyoom \
|
|
||||||
# etckeeper \
|
|
||||||
# deepin-screenshot \
|
|
||||||
# geoclue-2.0 \
|
|
||||||
# at
|
|
||||||
|
|||||||
17
install/canon-mg2500
Executable file
17
install/canon-mg2500
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install Canon Pixma MG2500 + ppa
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
sudo add-apt-repository -y ppa:thierry-f/fork-michael-gruz && \
|
||||||
|
sudo apt install -y \
|
||||||
|
cnijfilter-mg2500series \
|
||||||
|
scangearmp-mg2500series
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "Canon Pixma MG2500 installed!"
|
||||||
|
info "Now you must add a new printer in your system."
|
||||||
|
echo
|
||||||
|
}
|
||||||
@@ -1,15 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install google chrome (latest)
|
##makedesc: Install google chrome (latest)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing google chrome (latest)..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
# https://t.me/axenov_blog/251
|
# https://t.me/axenov_blog/251
|
||||||
|
|
||||||
# sudo snap install chromium
|
title
|
||||||
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -O /tmp/google-chrome-stable_current_amd64.deb
|
|
||||||
sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb
|
mkdir -p "$HOME/install"
|
||||||
rm /tmp/google-chrome-stable_current_amd64.deb
|
|
||||||
|
download "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \
|
||||||
|
"$HOME/install/google-chrome.deb" && \
|
||||||
|
sudo dpkg -i "$HOME/install/google-chrome.deb"
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "Google Chrome installed!"
|
||||||
|
google-chrome --version
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,56 +1,41 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install composer (latest)
|
##makedesc: Install composer (latest)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
echo
|
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing composer (latest)..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
installed() {
|
title
|
||||||
command -v "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
if installed "php"; then
|
require php
|
||||||
if installed "composer"; then
|
|
||||||
echo "WARNING: You already have composer installed - removing to install actual version"
|
if installed "composer"; then
|
||||||
|
warn "WARNING: Removing current composer to install its actual version"
|
||||||
sudo apt remove -y --autoremove composer
|
sudo apt remove -y --autoremove composer
|
||||||
sudo rm -f /bin/composer
|
sudo rm -f \
|
||||||
sudo rm -f /usr/bin/composer
|
"$HOME/.local/bin/composer" \
|
||||||
sudo rm -f /usr/local/bin/composer
|
/bin/composer \
|
||||||
sudo rm -rf /usr/src/composer
|
/usr/bin/composer \
|
||||||
fi
|
/usr/local/bin/composer \
|
||||||
sudo mkdir -m 0777 -p /usr/src/composer
|
/usr/src/composer \
|
||||||
cd /usr/src/composer
|
"$HOME/.local/bin/composer"
|
||||||
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
|
|
||||||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
|
|
||||||
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
|
||||||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
|
||||||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
|
|
||||||
>&2 echo 'ERROR: Invalid installer checksum'
|
|
||||||
rm composer-setup.php
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
php composer-setup.php --quiet
|
|
||||||
sudo cp /usr/src/composer/composer.phar /usr/local/bin/composer
|
|
||||||
cd - >/dev/null
|
|
||||||
sudo rm -rf /usr/src/composer/
|
|
||||||
installed "composer" && composer --version
|
|
||||||
else
|
|
||||||
echo "WARNING: You need to have php installed"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# title "Installing composer.phar in home dir..."
|
mkdir -p "$HOME/install" "$HOME/.local/bin"
|
||||||
# cd ~
|
download "https://getcomposer.org/installer" "$HOME/install/composer-setup.php" && \
|
||||||
# EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
|
php "$HOME/install/composer-setup.php" --install-dir="$HOME/.local/bin/composer"
|
||||||
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
|
||||||
# ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
[ $? = 0 ] && {
|
||||||
# if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
|
COMPOSER_GLOBAL_HOME="$($HOME/.local/bin/composer config -g home)"
|
||||||
# then
|
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
||||||
# >&2 echo 'ERROR: Invalid installer signature'
|
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
||||||
# rm composer-setup.php
|
$NEWPATH
|
||||||
# exit 1
|
echo "$NEWPATH" >> "$HOME/.profile"
|
||||||
# fi
|
}
|
||||||
# php composer-setup.php --quiet
|
|
||||||
# RESULT=$?
|
echo
|
||||||
# rm composer-setup.php
|
success "composer installed!"
|
||||||
|
composer --version
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
source "$HOME/.profile"
|
||||||
|
|||||||
@@ -1,34 +1,35 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install docker (latest) + docker-compose (latest) + ppa
|
##makedesc: Install docker (latest) + docker-compose (latest) + ppa
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing docker (latest)..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
# https://docs.docker.com/engine/install/ubuntu/
|
# https://docs.docker.com/engine/install/ubuntu/
|
||||||
|
|
||||||
sudo apt remove -y docker docker-engine docker.io containerd runc
|
title
|
||||||
sudo apt-get install \
|
|
||||||
ca-certificates \
|
require ca-certificates
|
||||||
curl \
|
require curl
|
||||||
gnupg \
|
require gnupg
|
||||||
lsb-release
|
require lsb-release
|
||||||
|
|
||||||
sudo mkdir -p /etc/apt/keyrings
|
sudo mkdir -p /etc/apt/keyrings
|
||||||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \
|
||||||
echo \
|
| sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
|
||||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
|
sudo chmod a+r /etc/apt/keyrings/docker.gpg && \
|
||||||
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
|
||||||
sudo chmod a+r /etc/apt/keyrings/docker.gpg
|
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||||
sudo apt update
|
sudo apt update && \
|
||||||
sudo apt install -y --autoremove \
|
sudo apt install -y --autoremove \
|
||||||
docker-ce \
|
docker-ce \
|
||||||
docker-ce-cli \
|
docker-ce-cli \
|
||||||
containerd.io \
|
containerd.io \
|
||||||
docker-compose-plugin \
|
docker-compose-plugin && \
|
||||||
docker-compose
|
sudo usermod -aG docker $(whoami)
|
||||||
sudo usermod -aG docker anthony
|
|
||||||
echo
|
[ $? = 0 ] && {
|
||||||
echo "You need to logout and log in again to apply docker group"
|
echo
|
||||||
echo
|
success "Docker installed!"
|
||||||
|
info "Probably, you need to relogin to apply 'docker' group."
|
||||||
|
info "Your ones currently are: $(groups)"
|
||||||
|
docker --version
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|||||||
22
install/dots
Executable file
22
install/dots
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install dotfiles
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
dotfiles_src_dir="`dirname $install_dir`/dotfiles"
|
||||||
|
postfix=".bak-`date '+%Y%m%d%H%M'`"
|
||||||
|
|
||||||
|
install_dotfile() {
|
||||||
|
mv "$HOME/$1" "$HOME/$1$postfix"
|
||||||
|
cp "$dotfiles_src_dir/$1" "$HOME/$1"
|
||||||
|
success "- $1"
|
||||||
|
}
|
||||||
|
|
||||||
|
install_dotfile ".bash_aliases" && \
|
||||||
|
install_dotfile ".profile" && \
|
||||||
|
install_dotfile ".bashrc" && \
|
||||||
|
install_dotfile ".gitconfig" && \
|
||||||
|
install_dotfile ".gitignore" && \
|
||||||
|
install_dotfile ".git_aliases"
|
||||||
@@ -1,20 +1,22 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install droidcam v1.8.2
|
##makedesc: Install droidcam v1.9.0
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
# https://www.dev47apps.com/droidcam/linux/
|
# https://www.dev47apps.com/droidcam/linux/
|
||||||
|
|
||||||
echo
|
title
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing droidcam v1.8.2..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
mkdir -p ~/install/droidcam
|
mkdir -p "$HOME/install/droidcam"
|
||||||
wget -O /tmp/droidcam.zip https://files.dev47apps.net/linux/droidcam_1.8.2.zip
|
|
||||||
unzip -o /tmp/droidcam.zip -d ~/install/droidcam
|
|
||||||
rm -rf /tmp/droidcam.zip
|
|
||||||
cd ~/install/droidcam && sudo ./install-client
|
|
||||||
|
|
||||||
echo
|
download "https://files.dev47apps.net/linux/droidcam_1.9.0.zip" "$HOME/install/droidcam.zip" && \
|
||||||
echo "Don't forget to install android app: https://play.google.com/store/apps/developer?id=Dev47Apps"
|
unzip -oq "$HOME/install/droidcam.zip" -d "$HOME/install/droidcam" && \
|
||||||
echo
|
cd "$HOME/install/droidcam" && \
|
||||||
|
sudo ./install-client
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "droidcam installed!"
|
||||||
|
info "Don't forget to install the android app:"
|
||||||
|
info "https://play.google.com/store/apps/developer?id=Dev47Apps"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
# https://www.dev47apps.com/droidcam/linux/
|
# https://www.dev47apps.com/droidcam/linux/
|
||||||
# https://www.dev47apps.com/obs/
|
# https://www.dev47apps.com/obs/
|
||||||
# https://www.dev47apps.com/obs/usage.html
|
# https://www.dev47apps.com/obs/usage.html
|
||||||
|
# https://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
@@ -11,16 +12,21 @@ echo "Installing droidcam-obs..."
|
|||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
command -v "obs" >/dev/null 2>&1 || echo 'You need to install obs first!'
|
# command -v "obs" >/dev/null 2>&1 || echo 'You need to install obs first!'
|
||||||
|
command -v "obs-studio" >/dev/null 2>&1 || echo 'You need to install obs-studio first!'
|
||||||
|
|
||||||
mkdir -p ~/install/droidcam_obs
|
mkdir -p $HOMEinstall/droidcam-obs
|
||||||
wget -O /tmp/droidcam-obs.zip https://files.dev47apps.net/obs/droidcam_obs_1.5.1_linux.zip
|
wget -O /tmp/droidcam-obs.zip https://files.dev47apps.net/obs/droidcam_obs_1.5.1_linux.zip
|
||||||
unzip -o /tmp/droidcam-obs.zip -d ~/install/droidcam-obs
|
unzip -oq /tmp/droidcam-obs.zip -d $HOMEinstall/droidcam-obs
|
||||||
rm -rf /tmp/droidcam-obs.zip
|
rm -rf /tmp/droidcam-obs.zip
|
||||||
cd ~/install/droidcam-obs && ./install.sh
|
cd $HOMEinstall/droidcam-obs && ./install.sh
|
||||||
|
sudo modprobe v4l2loopback video_nr=2 card_label="OBS Virtual Camera"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
echo "Finish!"
|
||||||
echo "Don't forget to:"
|
echo "Don't forget to:"
|
||||||
echo "1) restart OBS if it is running right now"
|
echo "1) restart OBS if it is running right now OR install (if not) and start it"
|
||||||
echo "2) install android app: https://play.google.com/store/apps/developer?id=Dev47Apps"
|
echo "2) install android app: https://play.google.com/store/apps/developer?id=Dev47Apps"
|
||||||
|
echo "3) if virtual camera not starting then execute:"
|
||||||
|
echo -e "\tsudo modprobe v4l2loopback video_nr=2 card_label=\"OBS Virtual Camera\""
|
||||||
echo
|
echo
|
||||||
|
|||||||
15
install/flameshot
Executable file
15
install/flameshot
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install flameshot (latest)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
sudo apt install -y --autoremove flameshot && \
|
||||||
|
sudo systemctl restart flameshot
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "flameshot installed!"
|
||||||
|
flameshot -v
|
||||||
|
echo
|
||||||
|
}
|
||||||
53
install/frkn
Executable file
53
install/frkn
Executable file
@@ -0,0 +1,53 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install Wireguard + FRKN
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
# https://frkn.org/ru/installation
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install/frkn"
|
||||||
|
cd "$HOME/install/frkn"
|
||||||
|
|
||||||
|
apt_install wireguard jq
|
||||||
|
|
||||||
|
countries=(uk ru nl nl2 ch)
|
||||||
|
for idx in ${!countries[@]}; do
|
||||||
|
country=${countries[idx]}
|
||||||
|
info "Downloading config for $country ($(expr $idx + 1)/${#countries[@]})"
|
||||||
|
|
||||||
|
json=$(curl -s "https://api.frkn.org/peer?location=$country" | jq)
|
||||||
|
|
||||||
|
iface_address=$(echo $json | jq -r .iface.address)
|
||||||
|
iface_privkey=$(echo $json | jq -r .iface.key)
|
||||||
|
iface_dns=$(echo $json | jq -r .iface.dns)
|
||||||
|
peer_pubkey=$(echo $json | jq -r .peer.pubkey)
|
||||||
|
peer_psk=$(echo $json | jq -r .peer.psk)
|
||||||
|
peer_allowed_ips=$(echo $json | jq -r .peer.allowed_ips)
|
||||||
|
peer_endpoint=$(echo $json | jq -r .peer.endpoint)
|
||||||
|
|
||||||
|
cat << EOF > "frkn-$country.conf"
|
||||||
|
[Interface]
|
||||||
|
Address = $iface_address
|
||||||
|
DNS = $iface_dns
|
||||||
|
PrivateKey = $iface_privkey
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
PublicKey = $peer_pubkey
|
||||||
|
PresharedKey = $peer_psk
|
||||||
|
AllowedIPs = $peer_allowed_ips
|
||||||
|
Endpoint = $peer_endpoint
|
||||||
|
PersistentKeepalive = 25
|
||||||
|
EOF
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
sudo cp frkn-*.conf /etc/wireguard/
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "Wireguard + FRKN installed!"
|
||||||
|
wg --version
|
||||||
|
info "Use 'wg-quick (up|down) frkn-($(implode '|' ${countries[@]}))' to control connections"
|
||||||
|
info "Use 'sudo wg show' to see connection status"
|
||||||
|
}
|
||||||
56
install/git
56
install/git
@@ -1,38 +1,38 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install git (latest)
|
##makedesc: Install git (latest)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
echo
|
title
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing git (latest)..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
installed() {
|
require make
|
||||||
command -v "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
||||||
|
|
||||||
! installed make && sudo apt install -y make
|
|
||||||
|
|
||||||
if installed git; then
|
if installed git; then
|
||||||
sudo rm -rf /usr/src/git
|
if [ -d "$HOME/install/git" ]; then
|
||||||
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
|
cd "$HOME/install/git" && \
|
||||||
sudo chown -R $USER: /usr/src/git
|
git pull
|
||||||
cd /usr/src/git/
|
else
|
||||||
sudo make prefix=/usr/local all
|
clone "https://github.com/git/git.git" "$HOME/install/git" --depth=1 --single-branch && \
|
||||||
|
cd "$HOME/install/git"
|
||||||
|
fi
|
||||||
|
sudo make prefix=/usr/local all && \
|
||||||
sudo make prefix=/usr/local install
|
sudo make prefix=/usr/local install
|
||||||
else
|
else
|
||||||
! installed wget && sudo apt install -y wget
|
require wget
|
||||||
wget https://github.com/git/git/archive/master.zip -O /tmp/git.zip
|
mkdir -p "$HOME/install/git"
|
||||||
sudo unzip -q /tmp/git.zip -d /usr/src/git
|
download "https://github.com/git/git/archive/master.zip" "/tmp/git.zip" && \
|
||||||
rm /tmp/git.zip
|
unzip -oq "/tmp/git.zip" -d "$HOME/install/git" && \
|
||||||
cd /usr/src/git/git-master
|
rm /tmp/git.zip && \
|
||||||
sudo make prefix=/usr/local all
|
cd "$HOME/install/git/git-master" && \
|
||||||
sudo make prefix=/usr/local install
|
sudo make prefix=/usr/local all && \
|
||||||
cd /usr/src
|
sudo make prefix=/usr/local install && \
|
||||||
sudo rm -rf git
|
cd - && \
|
||||||
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
|
rm -rf git && \
|
||||||
sudo chown -R $USER: /usr/src/git
|
clone "https://github.com/git/git.git" "$HOME/install/git" --depth=1 --single-branch
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git --version
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "git installed!"
|
||||||
|
git --version
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,27 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install golang v1.18.3
|
##makedesc: Install golang v1.21.0
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
# https://go.dev/dl/
|
# https://go.dev/dl/
|
||||||
# https://golang.org/doc/install
|
# https://golang.org/doc/install
|
||||||
# https://www.vultr.com/docs/install-the-latest-version-of-golang-on-ubuntu
|
# https://www.vultr.com/docs/install-the-latest-version-of-golang-on-ubuntu
|
||||||
|
|
||||||
|
[ $1 ] && VERSION="$1" || VERSION="1.21.6"
|
||||||
|
title "Installing golang v$VERSION..."
|
||||||
|
|
||||||
[ $1 ] && VERSION="$1" || VERSION="1.18.3"
|
|
||||||
FILE="go$VERSION.linux-amd64.tar.gz"
|
FILE="go$VERSION.linux-amd64.tar.gz"
|
||||||
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing golang v$VERSION..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
sudo rm -rf /usr/local/go && \
|
sudo rm -rf /usr/local/go && \
|
||||||
wget "https://golang.org/dl/$FILE" -O /tmp/$FILE && \
|
download "https://golang.org/dl/$FILE" "/tmp/$FILE" && \
|
||||||
sudo tar -xzf /tmp/$FILE -C /usr/local && \
|
sudo tar -xzf "/tmp/$FILE" -C /usr/local && \
|
||||||
rm -rf /tmp/$FILE && \
|
rm -rf "/tmp/$FILE" && \
|
||||||
sudo chown $USER: -R /usr/local/go && \
|
sudo chown $USER: -R /usr/local/go && \
|
||||||
echo 'export PATH="$PATH:/usr/local/go/bin\"' >> $HOME/.profile && \
|
echo 'export PATH="/usr/local/go/bin:$PATH"' >> "$HOME/.profile" && \
|
||||||
echo 'export GOPATH="$HOME/.go"' >> $HOME/.profile && \
|
echo "export GOPATH=\"\$HOME/.go\"" >> "$HOME/.profile" && \
|
||||||
# source ~/.profile && \
|
source ~/.profile
|
||||||
go version && \
|
|
||||||
echo "NOTE: now run 'source ~/.profile' to apply new env vars"
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "golang installed!"
|
||||||
|
info "NOTE: now run 'source ~/.profile' to apply new env vars"
|
||||||
|
go version
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|||||||
15
install/grub-customizer
Executable file
15
install/grub-customizer
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install grub-customizer (latest + ppa)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer && \
|
||||||
|
sudo apt install -y --autoremove grub-customizer
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "grub-customizer installed!"
|
||||||
|
grub-customizer -v
|
||||||
|
echo
|
||||||
|
}
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
##makedesc: Install grub-customizer (latest) + ppa
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing grub-customizer (latest)..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
|
|
||||||
sudo apt install -y --autoremove grub-customizer
|
|
||||||
20
install/jbmono
Executable file
20
install/jbmono
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install JetBrains Mono fonts
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
# https://www.jetbrains.com/lp/mono/#how-to-install
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
require unzip
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install/jbmono" "$HOME/.local/share/fonts/"
|
||||||
|
download "https://download.jetbrains.com/fonts/JetBrainsMono-2.304.zip" "$HOME/install/jbmono.zip" && \
|
||||||
|
unzip -oj "$HOME/install/jbmono.zip" "fonts/ttf/*.ttf" -d "$HOME/.local/share/fonts/" && \
|
||||||
|
fc-cache -vf "$HOME/.local/share/fonts/"
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "JetBrains Mono fonts installed!"
|
||||||
|
echo
|
||||||
|
}
|
||||||
@@ -29,7 +29,7 @@ if installed 'git'; then
|
|||||||
sudo git clone https://github.com/psifidotos/applet-window-appmenu.git --depth=1 /usr/src/appmenu-applet
|
sudo git clone https://github.com/psifidotos/applet-window-appmenu.git --depth=1 /usr/src/appmenu-applet
|
||||||
else
|
else
|
||||||
sudo wget https://github.com/psifidotos/applet-window-appmenu/archive/master.zip -O /tmp/appmenu-applet.zip
|
sudo wget https://github.com/psifidotos/applet-window-appmenu/archive/master.zip -O /tmp/appmenu-applet.zip
|
||||||
sudo unzip /tmp/appmenu-applet.zip -d /usr/src/appmenu-applet
|
sudo unzip -oq /tmp/appmenu-applet.zip -d /usr/src/appmenu-applet
|
||||||
sudo mv /usr/src/appmenu-applet/applet-window-appmenu-master/* /usr/src/appmenu-applet/
|
sudo mv /usr/src/appmenu-applet/applet-window-appmenu-master/* /usr/src/appmenu-applet/
|
||||||
sudo mv /usr/src/appmenu-applet/applet-window-appmenu-master/.* /usr/src/appmenu-applet/
|
sudo mv /usr/src/appmenu-applet/applet-window-appmenu-master/.* /usr/src/appmenu-applet/
|
||||||
sudo rm -rf /usr/src/appmenu-applet/applet-window-appmenu-master
|
sudo rm -rf /usr/src/appmenu-applet/applet-window-appmenu-master
|
||||||
|
|||||||
9
install/kde-backports
Executable file
9
install/kde-backports
Executable file
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install KDE Backports
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
sudo add-apt-repository -y ppa:kubuntu-ppa/backports && \
|
||||||
|
sudo apt update && \
|
||||||
|
sudo apt full-upgrade
|
||||||
118
install/kde-file-templates
Executable file
118
install/kde-file-templates
Executable file
@@ -0,0 +1,118 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install file templates (KDE)
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing file templates (KDE)..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
TPL_DIR="$HOME/.local/share/templates"
|
||||||
|
TPL_SRC="$TPL_DIR/.source"
|
||||||
|
[ ! -d "$TPL_SRC" ] && mkdir -p "$TPL_SRC"
|
||||||
|
|
||||||
|
echo "- Markdown" ####################################################
|
||||||
|
cat <<EOF > "$TPL_SRC/template.md"
|
||||||
|
# Title
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > "$TPL_DIR/md.desktop"
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Документ Markdown
|
||||||
|
Icon=text-markdown
|
||||||
|
Type=Link
|
||||||
|
URL=.source/template.md
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "- PHP" ####################################################
|
||||||
|
cat <<EOF > "$TPL_SRC/template.php"
|
||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
ini_set('error_reporting', E_ALL);
|
||||||
|
ini_set('display_errors', 1);
|
||||||
|
ini_set('display_startup_errors', 1);
|
||||||
|
ini_set('log_errors', 1);
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > "$TPL_DIR/php.desktop"
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=PHP-скрипт
|
||||||
|
Icon=application-x-php
|
||||||
|
Type=Link
|
||||||
|
URL=.source/template.php
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "- Shell" ####################################################
|
||||||
|
cat <<EOF > "$TPL_SRC/template.sh"
|
||||||
|
#!/bin/bash
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > "$TPL_DIR/sh.desktop"
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Bash-скрипт
|
||||||
|
Icon=terminal
|
||||||
|
Type=Link
|
||||||
|
URL=.source/template.sh
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "- Go" ####################################################
|
||||||
|
cat <<EOF > "$TPL_SRC/template.go"
|
||||||
|
package main
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
fmt.Println("hello world")
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > "$TPL_DIR/go.desktop"
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Golang файл
|
||||||
|
Type=Link
|
||||||
|
URL=.source/template.go
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "- Dockerfile" ####################################################
|
||||||
|
cat <<EOF > "$TPL_SRC/Dockerfile"
|
||||||
|
# https://habr.com/ru/company/ruvds/blog/439980/
|
||||||
|
# https://docs.docker.com/develop/develop-images/dockerfile_best-practices/
|
||||||
|
FROM ubuntu:latest
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > "$TPL_DIR/dockerfile.desktop"
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=Dockerfile
|
||||||
|
Type=Link
|
||||||
|
URL=.source/Dockerfile.go
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "- docker-compose" ####################################################
|
||||||
|
cat <<EOF > "$TPL_SRC/docker-compose.yml"
|
||||||
|
# https://docs.docker.com/compose/gettingstarted/
|
||||||
|
# https://docs.docker.com/compose/compose-file/compose-file-v3/
|
||||||
|
version: "3.9"
|
||||||
|
services:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
cat << EOF > "$TPL_DIR/docker-compose.desktop"
|
||||||
|
[Desktop Entry]
|
||||||
|
Name=docker-compose
|
||||||
|
Type=Link
|
||||||
|
URL=.source/docker-compose.yml
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish! You can find them here:"
|
||||||
|
echo -e "\t$TPL_DIR"
|
||||||
|
echo
|
||||||
|
|
||||||
19
install/kde-portal
Executable file
19
install/kde-portal
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install KDE portal
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing KDE portal..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
sudo apt install -y \
|
||||||
|
xdg-desktop-portal \
|
||||||
|
xdg-desktop-portal-kde \
|
||||||
|
xdg-desktop-portal-gtk && \
|
||||||
|
echo "GTK_USE_PORTAL=1" | sudo tee -a /etc/environment && \
|
||||||
|
echo "XDG_CURRENT_DESKTOP=KDE" | sudo tee -a /etc/environment
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish! Now you need to relogin"
|
||||||
|
echo
|
||||||
64
install/lazynvim
Executable file
64
install/lazynvim
Executable file
@@ -0,0 +1,64 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
|
||||||
|
|
||||||
|
set -eo pipefail
|
||||||
|
trap ontrap SIGINT SIGTERM SIGSTOP
|
||||||
|
|
||||||
|
ontrap() {
|
||||||
|
echo
|
||||||
|
echo "[!] Interrupted"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
[ -z "$1" ] && version=0.10.1 || version="$1"
|
||||||
|
|
||||||
|
filedir="$HOME/install/neovim-$version"
|
||||||
|
filename="nvim-linux64.tar.gz"
|
||||||
|
filepath="$filedir/$filename"
|
||||||
|
configdir="$HOME/.config/nvim"
|
||||||
|
localdir="$HOME/.local"
|
||||||
|
|
||||||
|
echo "[*] Installing neovim v$version"
|
||||||
|
|
||||||
|
if [ -d $configdir ]; then
|
||||||
|
mv $configdir "$configdir.bak-$(date +'%Y%m%d_%H%M%S')"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $filedir $configdir $localdir/{bin,lib,share}
|
||||||
|
|
||||||
|
if [ ! -f $filepath ]; then
|
||||||
|
echo "[*] Downloading to $filepath..."
|
||||||
|
wget -q https://github.com/neovim/neovim/releases/download/v$version/nvim-linux64.tar.gz \
|
||||||
|
-O $filepath \
|
||||||
|
--show-progress
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "[*] Unpacking: $filepath..."
|
||||||
|
tar -zxf $filepath -C $filedir
|
||||||
|
cp -rf $filedir/nvim-linux64/bin/nvim $localdir/bin/
|
||||||
|
cp -rf $filedir/nvim-linux64/lib/nvim $localdir/lib/
|
||||||
|
cp -rf $filedir/nvim-linux64/share $localdir/share
|
||||||
|
rm -rf $filedir/nvim-linux64
|
||||||
|
|
||||||
|
echo "[*] Reinit git repo..."
|
||||||
|
git clone https://github.com/LazyVim/starter \
|
||||||
|
$configdir \
|
||||||
|
--depth=1 \
|
||||||
|
--single-branch
|
||||||
|
cd $configdir
|
||||||
|
rm -rf .git
|
||||||
|
git init -q
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
11
install/libreoffice
Executable file
11
install/libreoffice
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install libreoffice
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing libreoffice..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
sudo apt update && \
|
||||||
|
sudo apt install -y --autoremove libreoffice
|
||||||
116
install/lite-xl
116
install/lite-xl
@@ -1,34 +1,100 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install lite-xl v2.0.5 (draft)
|
##makedesc: Install lite-xl
|
||||||
|
|
||||||
|
# https://github.com/lite-xl/lite-xl/releases
|
||||||
|
# https://lite-xl.com/en/documentation/build
|
||||||
|
|
||||||
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
|
|
||||||
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
|
|
||||||
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
|
|
||||||
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
|
|
||||||
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
|
|
||||||
|
|
||||||
# https://github.com/lite-xl/lite-xl
|
|
||||||
|
|
||||||
[ $1 ] && LITEXLVER="$1" || LITEXLVER="2.0.5"
|
|
||||||
echo
|
echo
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo "Installing lite-xl v${LITEXLVER}..."
|
echo "Installing lite-xl v2.1.0..."
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
wget "https://github.com/lite-xl/lite-xl/releases/download/v${LITEXLVER}/lite-xl-linux-x86_64.tar.gz" -O /tmp/lite-xl.tar.gz
|
tar_url="https://github.com/lite-xl/lite-xl/releases/download/v2.1.0/lite-xl-v2.1.0-addons-linux-x86_64-portable.tar.gz"
|
||||||
sudo tar -xzf /tmp/lite-xl.tar.gz -C /tmp
|
tar_filepath="/tmp/lite-xl.tar.gz"
|
||||||
mkdir -p $HOME/.local/bin && cp /tmp/lite-xl/bin/lite-xl $HOME/.local/bin
|
untar_dir="$HOME/install"
|
||||||
cp -r /tmp/lite-xl/share $HOME/.local
|
untar_subdir="$untar_dir/lite-xl"
|
||||||
rm -rf /tmp/lite-xl*
|
dest_bin_dir="$HOME/.local/bin"
|
||||||
echo -e 'export PATH="$PATH:$HOME/.local/bin"' >> $HOME/.bashrc
|
dest_config_dir="$HOME/.config/lite-xl"
|
||||||
[ -f $HOME/.zshrc ] && echo -e 'export PATH="$PATH:$HOME/.local/bin"' >> $HOME/.zshrc
|
dest_share_dir="$HOME/.local/share"
|
||||||
xdg-desktop-menu forceupdate
|
dest_share_subdir="$dest_share_dir/lite-xl"
|
||||||
|
|
||||||
### uninstall
|
wget "$tar_url" -O "$tar_filepath"
|
||||||
# rm -f $HOME/.local/bin/lite-xl
|
mkdir -vp \
|
||||||
# rm -rf $HOME/.local/share/icons/hicolor/scalable/apps/lite-xl.svg \
|
"$untar_dir" \
|
||||||
# $HOME/.local/share/applications/org.lite_xl.lite_xl.desktop \
|
#"$dest_config" \
|
||||||
# $HOME/.local/share/metainfo/org.lite_xl.lite_xl.appdata.xml \
|
"$dest_bin_dir" \
|
||||||
# $HOME/.local/share/lite-xl
|
"$dest_share_dir"
|
||||||
|
|
||||||
|
tar -xzf "$tar_filepath" -C "$untar_dir"
|
||||||
|
mv -fv "$untar_subdir/lite-xl" "$dest_bin_dir/lite-xl"
|
||||||
|
mv -fvT "$untar_subdir/data" "$dest_share_subdir"
|
||||||
|
rm -fr "$tar_file" "$untar_subdir"
|
||||||
|
|
||||||
|
# echo -e "\nexport LITE_SCALE=1 # https://github.com/lite-xl/lite-xl/issues/1173\n" >> $HOME/.profile
|
||||||
|
cat << EOF > "$dest_share_dir/applications/org.lite_xl.lite_xl.desktop"
|
||||||
|
[Desktop Entry]
|
||||||
|
Type=Application
|
||||||
|
Name=Lite XL
|
||||||
|
Comment=A lightweight text editor written in Lua
|
||||||
|
Exec=env LITE_SCALE=1 ${dest_bin_dir}/lite-xl %F
|
||||||
|
Icon=lite-xl
|
||||||
|
Terminal=false
|
||||||
|
StartupWMClass=lite-xl
|
||||||
|
Categories=Development;IDE;
|
||||||
|
MimeType=text/plain;
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo update-desktop-database && \
|
||||||
|
xdg-desktop-menu forceupdate
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing lite-xl plugins..."
|
||||||
|
echo "https://github.com/lite-xl/lite-xl-plugins"
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
download_plugin() {
|
||||||
|
echo "- $1"
|
||||||
|
curl -s "https://raw.githubusercontent.com/lite-xl/lite-xl-plugins/master/plugins/$1.lua" \
|
||||||
|
> "$dest_share_subdir/plugins/$1.lua"
|
||||||
|
}
|
||||||
|
|
||||||
|
download_plugin "align_carets"
|
||||||
|
download_plugin "autosaveonfocuslost"
|
||||||
|
download_plugin "bracketmatch"
|
||||||
|
download_plugin "copyfilelocation"
|
||||||
|
download_plugin "dragdropselected"
|
||||||
|
download_plugin "fontconfig"
|
||||||
|
download_plugin "force_syntax"
|
||||||
|
download_plugin "lfautoinsert"
|
||||||
|
download_plugin "markers"
|
||||||
|
download_plugin "memoryusage"
|
||||||
|
download_plugin "minimap"
|
||||||
|
download_plugin "navigate"
|
||||||
|
download_plugin "openselected"
|
||||||
|
download_plugin "restoretabs"
|
||||||
|
download_plugin "smoothcaret"
|
||||||
|
|
||||||
|
# echo "- eofnewline-xl"
|
||||||
|
# curl -s "https://raw.githubusercontent.com/bokunodev/lite_modules/master/plugins/eofnewline-xl.lua" \
|
||||||
|
# > "$dest_share_subdir/plugins/eofnewline-xl.lua"
|
||||||
|
|
||||||
|
echo "- language_env"
|
||||||
|
curl -s "https://raw.githubusercontent.com/anthonyaxenov/lite-xl-env-syntax/master/language_env.lua" \
|
||||||
|
> "$dest_share_subdir/plugins/language_env.lua"
|
||||||
|
|
||||||
|
echo "- language_ignore"
|
||||||
|
curl -s "https://raw.githubusercontent.com/anthonyaxenov/lite-xl-ignore-syntax/master/language_ignore.lua" \
|
||||||
|
> "$dest_share_subdir/plugins/language_ignore.lua"
|
||||||
|
|
||||||
|
# echo "- language-containerfile"
|
||||||
|
# git clone -q "https://github.com/FilBot3/lite-xl-language-containerfile.git" \
|
||||||
|
# "$dest_share_subdir/plugins/language_containerfile"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
echo "- $dest_bin_dir/lite-xl"
|
||||||
|
echo "- $dest_share_subdir"
|
||||||
|
echo
|
||||||
|
|||||||
@@ -11,20 +11,17 @@ installed() {
|
|||||||
command -v "$1" >/dev/null 2>&1
|
command -v "$1" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
# sudo apt install -y --autoremove nodejs npm
|
installed "nvm" && sudo apt install -y --autoremove nodejs npm nvm
|
||||||
|
|
||||||
if !installed "nvm"; then
|
! installed "nvm" && wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
||||||
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(nvm current) == 'system' ]; then
|
export NVM_DIR="$HOME/.nvm"
|
||||||
echo "WARNING: You already have node installed - removing to install actual version"
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||||
sudo apt remove -y --autoremove nodejs npm
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
||||||
else
|
|
||||||
nvm install-latest-npm
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
nvm install-latest-npm
|
||||||
nvm install node
|
nvm install node
|
||||||
nvm use node
|
nvm use node
|
||||||
installed "node" && nvm current
|
echo "Finish!"
|
||||||
|
nvm current
|
||||||
nvm ls
|
nvm ls
|
||||||
|
|||||||
25
install/ntfy
Executable file
25
install/ntfy
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install ntfy (latest) + ppa
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing ntfy (latest) + ppa..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
# https://ntfy.sh/docs/install/#general-steps
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed curl && sudo apt install -y curl
|
||||||
|
|
||||||
|
curl -sSL https://archive.heckel.io/apt/pubkey.txt | sudo apt-key add - && \
|
||||||
|
sudo apt install apt-transport-https && \
|
||||||
|
sudo sh -c "echo 'deb [arch=amd64] https://archive.heckel.io/apt debian main' \
|
||||||
|
> /etc/apt/sources.list.d/archive.heckel.io.list" && \
|
||||||
|
sudo apt update && \
|
||||||
|
sudo apt install ntfy -y && \
|
||||||
|
sudo systemctl enable ntfy && \
|
||||||
|
sudo systemctl start ntfy
|
||||||
10
install/obs-studio
Executable file
10
install/obs-studio
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install obs-studio (latest snap)
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing obs-studio (latest snap)..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
sudo snap install obs-studio
|
||||||
19
install/omz-clean
Executable file
19
install/omz-clean
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install omz (latest)
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing omz (latest)..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! installed zsh || ! installed git || ! installed curl; then
|
||||||
|
echo "ERROR: you need git, zsh and curl to be installed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||||
51
install/omz-fancy
Executable file
51
install/omz-fancy
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install omz fancy (powerline10k + MesloLGS font)
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing omz fancy: powerline10k + MesloLGS font..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! installed zsh || ! installed git || ! installed wget; then
|
||||||
|
echo "ERROR: you need git, zsh and wget to be installed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ ! -d "$HOME/.oh-my-zsh" ]]; then
|
||||||
|
echo "ERROR: you need omz to be installed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "1/3 Installing MesloLGS fonts..."
|
||||||
|
mkdir -p "$HOME/.local/share/fonts/"
|
||||||
|
FONTS_URL="https://github.com/romkatv/powerlevel10k-media/raw/master"
|
||||||
|
wget "$FONTS_URL/MesloLGS%20NF%20Regular.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Regular.ttf"
|
||||||
|
wget "$FONTS_URL/MesloLGS%20NF%20Bold.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Bold.ttf"
|
||||||
|
wget "$FONTS_URL/MesloLGS%20NF%20Italic.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Italic.ttf"
|
||||||
|
wget "$FONTS_URL/MesloLGS%20NF%20Bold%20Italic.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Bold Italic.ttf"
|
||||||
|
fc-cache -vf "$HOME/.local/share/fonts/"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "2/3 Installing powerlevel10k theme..."
|
||||||
|
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||||
|
sed -i 's#^ZSH_THEME=.*$#ZSH_THEME="powerlevel10k/powerlevel10k"#g' "$HOME/.zshrc"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "3/3 Installing plugins..."
|
||||||
|
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||||
|
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||||
|
sed -i 's/^plugins=/plugins=(git laravel docker docker-compose composer zsh-autosuggestions zsh-syntax-highlighting)/g' $HOME/.zshrc
|
||||||
|
p10k configure
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish! You need to:"
|
||||||
|
echo "- review your plugins in $HOME/.zshrc"
|
||||||
|
echo "- restart terminal windows to reload fonts and set 'MesloLGS NF Regular' as default font"
|
||||||
|
echo "- log out of your session and login again"
|
||||||
|
echo
|
||||||
31
install/openvpn
Executable file
31
install/openvpn
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install openvpn v2.6.3 (src)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
# https://openvpn.net/community-downloads/
|
||||||
|
# https://openvpn.net/community-resources/installing-openvpn/
|
||||||
|
|
||||||
|
[ "$1" ] && OVPNVER="$1" || OVPNVER='2.6.3'
|
||||||
|
|
||||||
|
title "Installing openvpn v${OVPNVER} (src)..."
|
||||||
|
|
||||||
|
require libssl-dev \
|
||||||
|
liblzo2-dev \
|
||||||
|
libpam0g-dev
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install/"
|
||||||
|
download "https://swupdate.openvpn.org/community/releases/openvpn-${OVPNVER}.tar.gz" "$HOME/install/openvpn-${OVPNVER}.tar.gz" && \
|
||||||
|
unpak_targz "$HOME/install/openvpn-${OVPNVER}.tar.gz" "$HOME/install/" && \
|
||||||
|
cd "$HOME/install/openvpn-${OVPNVER}" && \
|
||||||
|
sudo ./configure && \
|
||||||
|
sudo make && \
|
||||||
|
sudo make install &&
|
||||||
|
apt_install network-manager-openvpn \
|
||||||
|
network-manager-openvpn-gnome
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "openvpn installed!"
|
||||||
|
openvpn --version
|
||||||
|
echo
|
||||||
|
}
|
||||||
27
install/papirus
Executable file
27
install/papirus
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install papirus-icon-theme (latest)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install/papirus-icon-theme" "$HOME/.local/share/icons/"
|
||||||
|
|
||||||
|
if installed git; then
|
||||||
|
clone_quick https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git "$HOME/install/"
|
||||||
|
else
|
||||||
|
download https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "$HOME/install/papirus-icon-theme.zip" && \
|
||||||
|
unzip -oq "$HOME/install/papirus-icon-theme.zip" -d "$HOME/install/papirus-icon-theme" && \
|
||||||
|
rm -f "$HOME/install/papirus-icon-theme.zip"
|
||||||
|
fi
|
||||||
|
|
||||||
|
symlink "$HOME/install/papirus-icon-theme/Papirus" "$HOME/.local/share/icons/Papirus" && \
|
||||||
|
symlink "$HOME/install/papirus-icon-theme/Papirus-Dark" "$HOME/.local/share/icons/Papirus-Dark" && \
|
||||||
|
symlink "$HOME/install/papirus-icon-theme/Papirus-Light" "$HOME/.local/share/icons/Papirus-Light"
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "Papirus icons installed!"
|
||||||
|
info "You can find them in $HOME/.local/share/icons/"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,16 +1,14 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install postgresql (latest) and php-pgsql (if php is installed)
|
##makedesc: Install postgresql (latest) and php-pgsql (if php is installed)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
echo
|
title
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing postgresql (latest)..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
installed() {
|
require postgresql postgresql-contrib && \
|
||||||
command -v "$1" >/dev/null 2>&1
|
sudo service postgresql restart && \
|
||||||
}
|
{
|
||||||
|
echo
|
||||||
sudo apt install -y --autoremove postgresql postgresql-contrib
|
success "openvpn installed!"
|
||||||
sudo service postgresql restart
|
postgres --version
|
||||||
installed 'php' && sudo apt install -y --autoremove php-pgsql
|
echo
|
||||||
|
}
|
||||||
|
|||||||
39
install/php
39
install/php
@@ -11,24 +11,31 @@ echo
|
|||||||
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
|
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
|
||||||
sudo apt install -y --autoremove \
|
sudo apt install -y --autoremove \
|
||||||
php${PHPVER} \
|
php${PHPVER} \
|
||||||
|
php${PHPVER}-apcu \
|
||||||
|
php${PHPVER}-bcmath \
|
||||||
php${PHPVER}-cli \
|
php${PHPVER}-cli \
|
||||||
php${PHPVER}-common \
|
php${PHPVER}-common \
|
||||||
|
php${PHPVER}-curl \
|
||||||
|
php${PHPVER}-dev \
|
||||||
|
php${PHPVER}-dom \
|
||||||
|
php${PHPVER}-gd \
|
||||||
|
php${PHPVER}-intl \
|
||||||
|
php${PHPVER}-mbstring \
|
||||||
|
php${PHPVER}-mysql \
|
||||||
|
php${PHPVER}-opcache \
|
||||||
|
php${PHPVER}-pgsql \
|
||||||
|
php${PHPVER}-soap \
|
||||||
|
php${PHPVER}-sqlite3 \
|
||||||
php${PHPVER}-xdebug \
|
php${PHPVER}-xdebug \
|
||||||
# php${PHPVER}-bcmath \
|
php${PHPVER}-xml \
|
||||||
# php${PHPVER}-bz2 \
|
php${PHPVER}-xmlrpc \
|
||||||
# php${PHPVER}-curl \
|
php${PHPVER}-zip
|
||||||
# php${PHPVER}-gd \
|
|
||||||
# php${PHPVER}-json \
|
# php${PHPVER}-ldap \
|
||||||
# php${PHPVER}-mbstring \
|
# php${PHPVER}-dba \
|
||||||
# php${PHPVER}-mysql \
|
|
||||||
# php${PHPVER}-opcache \
|
|
||||||
# php${PHPVER}-pgsql \
|
|
||||||
# php${PHPVER}-soap \
|
|
||||||
# php${PHPVER}-xml \
|
|
||||||
# php${PHPVER}-xmlrpc \
|
|
||||||
# php${PHPVER}-xsl \
|
# php${PHPVER}-xsl \
|
||||||
# php${PHPVER}-sqlite3 \
|
|
||||||
# php${PHPVER}-zip
|
echo
|
||||||
# php${PHPVER}-dba
|
echo "Finish!"
|
||||||
# php${PHPVER}-ldap
|
|
||||||
php -v
|
php -v
|
||||||
|
echo
|
||||||
|
|||||||
30
install/php-psalm
Executable file
30
install/php-psalm
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install psalm
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing psalm..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
|
||||||
|
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
|
||||||
|
|
||||||
|
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
|
||||||
|
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
||||||
|
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
||||||
|
$NEWPATH
|
||||||
|
echo "$NEWPATH" >> "$HOME/.profile"
|
||||||
|
}
|
||||||
|
source "$HOME/.profile"
|
||||||
|
|
||||||
|
composer global require vimeo/psalm --dev
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
psalm --version
|
||||||
|
echo
|
||||||
46
install/php-spx
Executable file
46
install/php-spx
Executable file
@@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install php-spx
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing php-spx..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
|
||||||
|
! installed 'phpize' && echo 'ERROR: You need php-dev to be installed' && exit 2
|
||||||
|
! installed 'make' && sudo apt install -y make
|
||||||
|
! installed 'wget' && sudo apt install -y wget
|
||||||
|
|
||||||
|
[ -d "$HOME/install/php-spx" ] || mkdir -p "$HOME/install/php-spx"
|
||||||
|
wget https://github.com/NoiseByNorthwest/php-spx/archive/refs/heads/release/latest.zip -O /tmp/php-spx.zip \
|
||||||
|
&& unzip -oq /tmp/php-spx.zip -d "$HOME/install/php-spx" \
|
||||||
|
&& rm /tmp/php-spx.zip \
|
||||||
|
&& cd "$HOME/install/php-spx/php-spx-release-latest" \
|
||||||
|
&& phpize \
|
||||||
|
&& ./configure \
|
||||||
|
&& make \
|
||||||
|
&& sudo make install
|
||||||
|
|
||||||
|
PHPVER=`php -r 'echo ($v=explode(".",PHP_VERSION))[0].".".$v[1];'`
|
||||||
|
cat << EOF | sudo tee -a "/etc/php/${PHPVER}/mods-available/spx.ini"
|
||||||
|
; https://github.com/NoiseByNorthwest/php-spx/tree/release/latest#configuration
|
||||||
|
; https://habr.com/ru/post/505192/
|
||||||
|
|
||||||
|
; extension=spx.so
|
||||||
|
; spx.data_dir = '/tmp/spx'
|
||||||
|
spx.http_enabled = 0
|
||||||
|
spx.http_key = 'spx'
|
||||||
|
; spx.http_ip_whitelist = "127.0.0.1"
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
|
sudo ln -sf "/etc/php/${PHPVER}/mods-available/spx.ini" "/etc/php/${PHPVER}/cli/conf.d/99-spx.ini"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
echo
|
||||||
32
install/phpcs
Executable file
32
install/phpcs
Executable file
@@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install phpcs + php-cs-fixer
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing phpcs + php-cs-fixer..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
|
||||||
|
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
|
||||||
|
|
||||||
|
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
|
||||||
|
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
||||||
|
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
||||||
|
$NEWPATH
|
||||||
|
echo "$NEWPATH" >> "$HOME/.profile"
|
||||||
|
}
|
||||||
|
source "$HOME/.profile"
|
||||||
|
|
||||||
|
composer global require squizlabs/php_codesniffer --dev
|
||||||
|
composer global require friendsofphp/php-cs-fixer --dev
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
phpcs --version # phpcbf --version
|
||||||
|
php-cs-fixer --version
|
||||||
|
echo
|
||||||
30
install/phpmd
Executable file
30
install/phpmd
Executable file
@@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install phpmd
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing phpmd..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
|
||||||
|
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
|
||||||
|
|
||||||
|
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
|
||||||
|
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
||||||
|
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
||||||
|
$NEWPATH
|
||||||
|
echo "$NEWPATH" >> "$HOME/.profile"
|
||||||
|
}
|
||||||
|
source "$HOME/.profile"
|
||||||
|
|
||||||
|
composer global require phpmd/phpmd --dev
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
phpmd --version
|
||||||
|
echo
|
||||||
31
install/phpstan
Executable file
31
install/phpstan
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install phpstan
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing phpstan..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
|
||||||
|
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
|
||||||
|
|
||||||
|
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
|
||||||
|
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
||||||
|
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
||||||
|
$NEWPATH
|
||||||
|
echo "$NEWPATH" >> "$HOME/.profile"
|
||||||
|
}
|
||||||
|
source "$HOME/.profile"
|
||||||
|
|
||||||
|
composer global require phpstan/phpstan --dev
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
phpstan --version
|
||||||
|
echo
|
||||||
|
|
||||||
31
install/phpunit
Executable file
31
install/phpunit
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install phpunit
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing phpunit..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
|
||||||
|
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
|
||||||
|
|
||||||
|
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
|
||||||
|
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
||||||
|
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
||||||
|
$NEWPATH
|
||||||
|
echo "$NEWPATH" >> "$HOME/.profile"
|
||||||
|
}
|
||||||
|
source "$HOME/.profile"
|
||||||
|
|
||||||
|
composer global require phpunit/phpunit --dev
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
phpunit --version
|
||||||
|
echo
|
||||||
|
|
||||||
@@ -1,27 +1,33 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install postman (latest)
|
##makedesc: Install postman (latest)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
echo
|
# https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing postman (latest)..."
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
wget "https://dl.pstmn.io/download/latest/linux64" -O /tmp/postman.tar.gz
|
# set -ex
|
||||||
# sudo tar -xvzf /tmp/postman.tar.gz -C /usr/local/bin
|
|
||||||
sudo tar -xzf /tmp/postman.tar.gz -C /usr/local
|
|
||||||
rm /tmp/postman.tar.gz
|
|
||||||
sudo ln -s /usr/local/Postman/Postman /usr/local/bin/postman
|
|
||||||
|
|
||||||
echo "#!/usr/bin/env xdg-open
|
title
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install" && \
|
||||||
|
"$HOME/.local/bin" && \
|
||||||
|
"$HOME/.local/share/applications"
|
||||||
|
|
||||||
|
download "https://dl.pstmn.io/download/latest/linux64" "$HOME/install/postman.tar.gz" && \
|
||||||
|
unpak_targz "$HOME/install/postman.tar.gz" "$HOME/install" && \
|
||||||
|
symlink "$HOME/install/Postman/Postman" "$HOME/.local/bin/postman" && \
|
||||||
|
cat << EOF > "$HOME/.local/share/applications/Postman.desktop" && sudo update-desktop-database
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Postman
|
Name=Postman
|
||||||
Exec=/usr/local/bin/postman
|
Exec=$HOME/.local/bin/postman %U
|
||||||
Icon=/usr/local/Postman/app/icons/icon_128x128.png
|
Icon=$HOME/install/Postman/app/icons/icon_128x128.png
|
||||||
Categories=Utility,Network
|
Categories=Development,Network
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Encoding=UTF-8
|
Encoding=UTF-8
|
||||||
" > $HOME/.local/share/applications/Postman.desktop
|
EOF
|
||||||
sudo update-desktop-database
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "Postman installed!"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|||||||
25
install/qt5
Executable file
25
install/qt5
Executable file
@@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install qt5
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing qt5..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
sudo apt install -y --autoremove \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
cmake \
|
||||||
|
g++ \
|
||||||
|
libqt5core5a \
|
||||||
|
libqt5dbus5 \
|
||||||
|
libqt5gui5 \
|
||||||
|
libqt5network5 \
|
||||||
|
libqt5svg5 \
|
||||||
|
libqt5svg5-dev \
|
||||||
|
libqt5widgets5 \
|
||||||
|
openssl \
|
||||||
|
qtbase5-dev \
|
||||||
|
qttools5-dev \
|
||||||
|
qttools5-dev-tools
|
||||||
@@ -1,16 +1,20 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install rustdesk v1.1.8 (deb)
|
##makedesc: Install rustdesk client v1.1.9 (deb)
|
||||||
|
|
||||||
[ $1 ] && RDVER="$1" || RDVER="1.1.8"
|
[ $1 ] && RDVER="$1" || RDVER="1.1.9"
|
||||||
echo
|
echo
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo "Installing rustdesk v${RDVER}..."
|
echo "Installing rustdesk v$RDVER..."
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
# https://github.com/rustdesk/rustdesk
|
# https://github.com/rustdesk/rustdesk
|
||||||
|
|
||||||
sudo apt install libxdo3
|
deb_path="$HOME/install"
|
||||||
wget "http://github.com/rustdesk/rustdesk/releases/download/${RDVER}/rustdesk-${RDVER}.deb" -qO /tmp/rustdesk.deb
|
deb_name="rustdesk-$RDVER.deb"
|
||||||
sudo dpkg -i /tmp/rustdesk.deb
|
mkdir -p $deb_path
|
||||||
rm /tmp/rustdesk.deb
|
deb="$deb_path/$deb_name"
|
||||||
|
|
||||||
|
sudo apt install -y libxdo3 python3-pip && \
|
||||||
|
wget "https://github.com/rustdesk/rustdesk/releases/download/$RDVER/$deb_name" -O $deb && \
|
||||||
|
sudo dpkg -i $deb
|
||||||
|
|||||||
27
install/snap
27
install/snap
@@ -18,27 +18,26 @@ snapi() {
|
|||||||
|
|
||||||
if ! installed snapd; then
|
if ! installed snapd; then
|
||||||
sudo apt update
|
sudo apt update
|
||||||
sudo apt install -y --autoremove snapd gnome-software-plugin-snap
|
sudo apt install -y --autoremove snapd #gnome-software-plugin-snap
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# snapi snap-store
|
# snapi snap-store
|
||||||
snapi telegram-desktop
|
|
||||||
snapi code
|
|
||||||
# snapi phpstorm
|
|
||||||
snapi skype
|
|
||||||
# snapi audacity
|
|
||||||
# snapi flameshot
|
|
||||||
# snapi gtk-common-themes
|
# snapi gtk-common-themes
|
||||||
# snapi gtk2-common-themes
|
# snapi gtk2-common-themes
|
||||||
# snapi kde-frameworks-5-core18
|
|
||||||
snapi zoom-client
|
|
||||||
snapi peek
|
snapi peek
|
||||||
|
# snapi telegram-desktop #todo
|
||||||
|
# snapi code # deb https://github.com/microsoft/vscode/issues/221836
|
||||||
|
snapi skype
|
||||||
|
snapi dbeaver-ce
|
||||||
|
# snapi mysql-workbench-community
|
||||||
|
# snapi discord
|
||||||
|
# snapi phpstorm
|
||||||
|
# snapi audacity
|
||||||
|
# snapi flameshot # deb
|
||||||
|
# snapi zoom-client # deb
|
||||||
|
|
||||||
# https://certbot.eff.org/
|
# https://certbot.eff.org/
|
||||||
# snapi certbot
|
# snapi certbot
|
||||||
# sudo ln -s /snap/bin/certbot /usr/bin/certbot
|
# sudo ln -sf /snap/bin/certbot /usr/bin/certbot
|
||||||
|
|
||||||
# snapi mysql-workbench-community
|
|
||||||
snapi dbeaver-ce
|
|
||||||
# snapi discord
|
|
||||||
# snapi obs-studio
|
|
||||||
|
|||||||
22
install/sublimetext
Executable file
22
install/sublimetext
Executable file
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install Sublime Text (build 4169)
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
# https://www.sublimetext.com/download_thanks?target=x64-deb
|
||||||
|
# https://gist.github.com/skoqaq/3f3e8f28e23c881143cef9cf49d821ff
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install"
|
||||||
|
|
||||||
|
download https://download.sublimetext.com/sublime-text_build-4169_amd64.deb \
|
||||||
|
"$HOME/install/sublime-text_build-4169_amd64.deb" && \
|
||||||
|
sudo dpkg -i "$HOME/install/sublime-text_build-4169_amd64.deb" && \
|
||||||
|
echo "00489f39: c640 0501 4885 c9" | sudo xxd -r - /opt/sublime_text/sublime_text
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "Sublime Text installed!"
|
||||||
|
subl --version
|
||||||
|
echo
|
||||||
|
}
|
||||||
@@ -24,5 +24,5 @@ sudo apt install -y --autoremove syncthing
|
|||||||
|
|
||||||
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O $HOME/.local/share/applications/syncthing-start.desktop
|
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O $HOME/.local/share/applications/syncthing-start.desktop
|
||||||
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O $HOME/.local/share/applications/syncthing-ui.desktop
|
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O $HOME/.local/share/applications/syncthing-ui.desktop
|
||||||
ln -s $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop
|
ln -sf $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop
|
||||||
# или демоном: https://habr.com/ru/post/350892/
|
# или демоном: https://habr.com/ru/post/350892/
|
||||||
|
|||||||
13
install/telegram
Executable file
13
install/telegram
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install telegram (latest)
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing telegram (latest)..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install" "$HOME/.local/bin"
|
||||||
|
wget "https://telegram.org/dl/desktop/linux" -O $HOME/install/telegram.tar.gz && \
|
||||||
|
tar -xJf $HOME/install/telegram.tar.gz -C $HOME/.local/bin
|
||||||
|
$HOME/.local/bin/Telegram/Telegram & disown > /dev/null
|
||||||
@@ -7,5 +7,5 @@ echo "Installing ulauncher (latest) + ppa..."
|
|||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
sudo add-apt-repository ppa:agornostal/ulauncher
|
sudo add-apt-repository -y ppa:agornostal/ulauncher
|
||||||
sudo apt install -y --autoremove ulauncher
|
sudo apt install -y --autoremove ulauncher
|
||||||
|
|||||||
21
install/vivaldi
Executable file
21
install/vivaldi
Executable file
@@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install Vivaldi + ppa
|
||||||
|
|
||||||
|
# https://repo.vivaldi.com
|
||||||
|
# https://help.vivaldi.com/desktop/#install-update
|
||||||
|
# https://help.vivaldi.com/desktop/install-update/manual-setup-vivaldi-linux-repositories/
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing Vivaldi + ppa..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub \
|
||||||
|
| gpg --dearmor \
|
||||||
|
| sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg
|
||||||
|
|
||||||
|
echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" \
|
||||||
|
| sudo dd of=/etc/apt/sources.list.d/vivaldi-archive.list
|
||||||
|
|
||||||
|
sudo apt update && sudo apt install vivaldi-stable
|
||||||
18
install/vscode
Executable file
18
install/vscode
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: VSCode deb-package
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
mkdir -p "$HOME/install"
|
||||||
|
|
||||||
|
download "https://code.visualstudio.com/docs/?dv=linux64_deb" \
|
||||||
|
"$HOME/install/vscode.deb" && \
|
||||||
|
sudo dpkg -i "$HOME/install/vscode.deb"
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "VSCode installed"
|
||||||
|
vscode --version
|
||||||
|
echo
|
||||||
|
}
|
||||||
@@ -9,6 +9,6 @@ echo
|
|||||||
|
|
||||||
sudo dpkg --add-architecture i386
|
sudo dpkg --add-architecture i386
|
||||||
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
|
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
|
||||||
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
|
sudo add-apt-repository -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
|
||||||
sudo apt install -y --autoremove winehq-stable
|
sudo apt install -y --autoremove winehq-stable
|
||||||
wine --version
|
wine --version
|
||||||
|
|||||||
40
install/youtube-dl
Executable file
40
install/youtube-dl
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install youtube-dl (src)
|
||||||
|
|
||||||
|
# https://github.com/ytdl-org/youtube-dl#installation
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing youtube-dl (src)..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
# 11.04.23: release 2021.12.17 in snap/apt/github is broken (Unable to extract uploader id)
|
||||||
|
# and still no fix officially released, so we just build it from actual sources
|
||||||
|
|
||||||
|
# curl -L https://yt-dl.org/downloads/latest/youtube-dl -o "$HOME/.local/bin/youtube-dl" && \
|
||||||
|
# sudo chmod +rx "$HOME/.local/bin/youtube-dl"
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed make && sudo apt install -y make
|
||||||
|
mkdir -p "$HOME/install/youtube-dl" "$HOME/.local/bin"
|
||||||
|
|
||||||
|
if installed git; then
|
||||||
|
git clone https://github.com/ytdl-org/youtube-dl.git "$HOME/install/youtube-dl" --depth=1 --single-branch
|
||||||
|
else
|
||||||
|
! installed wget && sudo apt install -y wget
|
||||||
|
wget https://github.com/ytdl-org/youtube-dl/archive/refs/heads/master.zip -O "$HOME/install/youtube-dl.zip" && \
|
||||||
|
unzip -oq "$HOME/install/youtube-dl.zip" -d "$HOME/install/youtube-dl"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd "$HOME/install/youtube-dl" && \
|
||||||
|
make youtube-dl && \
|
||||||
|
mv youtube-dl "$HOME/.local/bin"
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
youtube-dl --version
|
||||||
|
echo
|
||||||
15
install/ytdlcue
Executable file
15
install/ytdlcue
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Install ytdlcue
|
||||||
|
|
||||||
|
# https://gist.github.com/anthonyaxenov/8e11f18493c8419ee7abc94a8ea0cfaf
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Installing ytdlcue..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||||
|
tools_dir="`dirname $install_dir`/tools"
|
||||||
|
cp "${tools_dir}/ytdlcue.sh" "$HOME/.local/bin/ytdlcue"
|
||||||
|
sudo chmod +rx "$HOME/.local/bin/ytdlcue"
|
||||||
51
install/zsh
51
install/zsh
@@ -1,56 +1,11 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
##makedesc: Install zsh + omz (latest)
|
##makedesc: Install vanilla zsh
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo "Installing zsh + omz (latest)..."
|
echo "Installing vanilla zsh..."
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
installed() {
|
|
||||||
command -v "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
if ! installed git || ! installed curl; then
|
|
||||||
echo "ERROR: you need git and curl to be installed!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
sudo apt install -y --autoremove zsh
|
sudo apt install -y --autoremove zsh
|
||||||
# sudo chsh -s $(which zsh)
|
echo "source ~/.profile" >> "$HOME/.zshrc"
|
||||||
|
|
||||||
# Based on:
|
|
||||||
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions
|
|
||||||
# https://github.com/ohmyzsh/ohmyzsh
|
|
||||||
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation
|
|
||||||
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95
|
|
||||||
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "1. Installing oh-my-zsh..."
|
|
||||||
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "2. Installing powerlevel9k theme (legacy)..."
|
|
||||||
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
|
|
||||||
sed -i 's@^ZSH_THEME=.*$@ZSH_THEME="powerlevel9k/powerlevel9k"@g' ~/.zshrc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "3. Installing powerline fonts..."
|
|
||||||
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
|
|
||||||
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
|
|
||||||
mkdir -p ~/.local/share/fonts/
|
|
||||||
mv PowerlineSymbols.otf ~/.local/share/fonts/
|
|
||||||
fc-cache -vf ~/.local/share/fonts/
|
|
||||||
mkdir -p ~/.config/fontconfig/conf.d/
|
|
||||||
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "4. Installing autosuggestions and syntax highlighting..."
|
|
||||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git .oh-my-zsh/custom/plugins/zsh-autosuggestions
|
|
||||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git .oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
|
||||||
sed -i 's@plugins=(git)@plugins=(git zsh-autosuggestions zsh-syntax-highlighting)@g' ~/.zshrc
|
|
||||||
|
|
||||||
echo
|
|
||||||
echo "Finish! Log out of your session and login again."
|
|
||||||
echo
|
|
||||||
|
|||||||
2
packs/flameshot
Normal file
2
packs/flameshot
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
##flameshot: [TODO] [PACK] qt5 + flameshot from source
|
||||||
|
flameshot: qt5 flameshot-build
|
||||||
2
packs/lamp
Normal file
2
packs/lamp
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
##lamp: [PACK] Apache + php + mariadb
|
||||||
|
lamp: apache phpstack mariadb
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
##lamp: Apache + php + mariadb
|
|
||||||
lamp: apache php mariadb
|
|
||||||
2
packs/obs
Normal file
2
packs/obs
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
##obs: [PACK] Install OBS Studio + droidcam-obs
|
||||||
|
obs: obs-studio droidcam-obs
|
||||||
4
packs/omz
Normal file
4
packs/omz
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
##omz: [PACK] zsh + omz + powerline10k + MesloLGS font
|
||||||
|
omz: zsh omz-clean omz-fancy
|
||||||
|
chsh -s /usr/bin/zsh
|
||||||
|
@exec zsh
|
||||||
2
packs/phpstack
Normal file
2
packs/phpstack
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd)
|
||||||
|
phptools: composer php-psalm php-spx phpcs phpmd phpstan phpunit
|
||||||
2
packs/phptools
Normal file
2
packs/phptools
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
##phpstack: [PACK] Install full php stack with tooling
|
||||||
|
phpstack: php phptools
|
||||||
@@ -1,120 +0,0 @@
|
|||||||
##############################################################
|
|
||||||
# Скрипт для автоматического резервного копирования
|
|
||||||
# базы данных.
|
|
||||||
#
|
|
||||||
# Автор: Антон Аксенов
|
|
||||||
# URL: anthonyaxenov.ru
|
|
||||||
# Email: anthonyaxenov@gmail.com
|
|
||||||
#
|
|
||||||
# Подробности о скрипте, подготовка к работе:
|
|
||||||
# https://anthonyaxenov.blogspot.ru/2017/05/cron-1.html
|
|
||||||
#
|
|
||||||
##############################################################
|
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Данные для работы с БД
|
|
||||||
DBHOST=
|
|
||||||
DBUSER=
|
|
||||||
DBPASS=
|
|
||||||
DBNAME=
|
|
||||||
DBCHARSET="utf8"
|
|
||||||
|
|
||||||
# Даты
|
|
||||||
FMT_DT_DIR="%d-%m-%Y" # формат даты для директорий | 19-03-2021
|
|
||||||
FMT_DT_FILE="%H%M%S-%d%m%y" # формат даты для файлов | 082456-190321
|
|
||||||
FMT_DT_LOG="%H:%M:%S" # формат даты для лога | 08:24:15.168149413
|
|
||||||
|
|
||||||
# Локальное хранилище
|
|
||||||
LOCALDIR=/backup # полный путь директории для бэкапов
|
|
||||||
LOCALPATH=$LOCALDIR/$(date +$FMT_DT_DIR) # полный путь директории за сегодня
|
|
||||||
LOCALFILE=$LOCALPATH/$DBNAME-$(date +$FMT_DT_FILE).sql # полный путь к файлу дампа
|
|
||||||
|
|
||||||
# Облачное хранилище
|
|
||||||
CLOUDUSE=1 # Копировать ли в облако? Закомментировать строку, если не надо
|
|
||||||
CLOUDMNT=/mnt/yadisk # Точка монтирования облака относительно корня
|
|
||||||
CLOUDDIR=db_backup # Папка в облаке, куда будут лететь файлы (внутри папки CLOUDMNT, т.е. без / в начале)
|
|
||||||
CLOUDPATH=$CLOUDMNT/$CLOUDDIR/$DATE # полный путь к папке текущей даты в облаке относительно корня
|
|
||||||
CLOUDFILE=$CLOUDPATH/$DBNAME-$DATETIME.sql # полный путь к файлу дампа в облаке
|
|
||||||
CLOUDFILEGZ=$CLOUDFILE.gz # полный путь к архиву в облаке
|
|
||||||
|
|
||||||
# Путь к бекапу на примонтированном хранилище будет выглядеть так:
|
|
||||||
# /mnt/yadisk/db_backup/2017-01-01/mybigdatabase-2017-01-01-12-23-34.sql.gz
|
|
||||||
|
|
||||||
log() {
|
|
||||||
echo "[$(date +$FMT_DT_LOG)] $*"
|
|
||||||
}
|
|
||||||
|
|
||||||
is_dir() {
|
|
||||||
[ -d "$1" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
# Начало процесса
|
|
||||||
echo "[--------------------------------[$(date +$FMT_DT_LOG)]--------------------------------]"
|
|
||||||
log $LOCALPATH
|
|
||||||
if ! is_dir $LOCALPATH; then # Если нет папки за сегодня
|
|
||||||
sudo mkdir -p $LOCALPATH # создаём её, ошибки игнорируем
|
|
||||||
[ $? -eq 0 ] && log "New directory: $LOCALPATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
log "Generate a database dump: '$DBNAME'..."
|
|
||||||
mysqldump \
|
|
||||||
-q \
|
|
||||||
--user=$DBUSER \
|
|
||||||
--host=$DBHOST \
|
|
||||||
--password=$DBPASS \
|
|
||||||
--opt \
|
|
||||||
--default-character-set=$DBCHARSET $DBNAME \
|
|
||||||
> $LOCALFILE
|
|
||||||
exit
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if [[ $? -gt 0 ]]; then
|
|
||||||
# если дамп сделать не удалось (код завершения предыдущей команды больше нуля) - прерываем весь скрипт
|
|
||||||
log "Dumping failed! Script aborted."
|
|
||||||
exit 1
|
|
||||||
else # иначе - упаковываем его
|
|
||||||
log "Dumping successfull! Packing in GZIP..."
|
|
||||||
gzip $LOCALFILE # Упаковка
|
|
||||||
if [[ $? -ne 0 ]]; then # Если не удалась
|
|
||||||
log "GZipping failed! SQL-file will be uploaded."
|
|
||||||
GZIP_FAILED=1 # Создаём флажок, что упаковка сорвалась
|
|
||||||
else
|
|
||||||
log "Result file: $LOCALFILEGZ"
|
|
||||||
fi
|
|
||||||
if [[ $CLOUDUSE -eq 1 ]]; then # Если задано копирование в облако - делаем всякое такое
|
|
||||||
mount | grep "$CLOUDMNT" > /dev/null # Проверяем примонтировано ли уже у нас облако (вывод не важен)
|
|
||||||
if [[ $? -ne 0 ]]; then # Если нет
|
|
||||||
mount $CLOUDMNT # значит монтируем
|
|
||||||
fi
|
|
||||||
if [[ $? -eq 0 ]]; then # если монтирование успешно - копируем туда файл
|
|
||||||
log "Cloud: successfully mounted at $CLOUDMNT"
|
|
||||||
log "Cloud: copying started => $CLOUDFILEGZ"
|
|
||||||
if ! [[ -d $CLOUDPATH ]]; then # Если в облаке нет папки за сегодня
|
|
||||||
mkdir $CLOUDPATH 2> /dev/null # создаём её, ошибки игнорируем
|
|
||||||
fi
|
|
||||||
if [[ -f $LOCALFILEGZ && GZIP_FAILED -ne 1 ]]; then # Если у нас архивирование выше не сорвалось
|
|
||||||
cp -R $LOCALFILEGZ $CLOUDFILEGZ # Копируем архив
|
|
||||||
else
|
|
||||||
cp -R $LOCALFILE $CLOUDFILE # Иначе - копируем большой тяжёлый дамп
|
|
||||||
fi
|
|
||||||
if [[ $? -gt 0 ]]; then # Если не скопировался - просто сообщаем
|
|
||||||
log "Cloud: copy failed."
|
|
||||||
else # Если скопировался - сообщаем и размонтируем
|
|
||||||
log "Cloud: file successfully uploaded!"
|
|
||||||
umount $CLOUDMNT # Размонтирование облака
|
|
||||||
if [[ $? -gt 0 ]]; then # Сообщаем результат размонтирования (если необходимо)
|
|
||||||
log "Cloud: umount - failed!"
|
|
||||||
fi # Конец проверки успешного РАЗмонтирования
|
|
||||||
fi # Конец проверки успешного копирования
|
|
||||||
else # если монтирование НЕуспешно - сообщаем
|
|
||||||
log "Cloud: failed to mount cloud at $CLOUDMNT"
|
|
||||||
fi # Конец проверки успешного монтирования
|
|
||||||
fi # Конец проверки необходимости выгрузки в облако
|
|
||||||
fi # Конец проверки успешного выполнения mysqldump
|
|
||||||
log "Stat datadir space (USED): `du -h $LOCALPATH | tail -n1`" # вывод размера папки с бэкапами за текущий день
|
|
||||||
log "Free HDD space: `df -h /home|tail -n1|awk '{print $4}'`" # вывод свободного места на локальном диске
|
|
||||||
log "All operations completed!"
|
|
||||||
exit 0 # Успешное завершение скрипта
|
|
||||||
50
tools/fix-obs-vcam.sh
Executable file
50
tools/fix-obs-vcam.sh
Executable file
@@ -0,0 +1,50 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://obsproject.com/kb/virtual-camera-troubleshooting
|
||||||
|
# https://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
|
||||||
|
# https://blog.csdn.net/qq_43008667/article/details/128041455
|
||||||
|
# https://blog.jbrains.ca/permalink/using-obs-studio-as-a-virtual-cam-on-linux
|
||||||
|
# https://github.com/obsproject/obs-studio/issues/4808
|
||||||
|
|
||||||
|
# v4l2loopback-dkms
|
||||||
|
|
||||||
|
# obs_start()
|
||||||
|
# {
|
||||||
|
# #This function is intended to prevent blank cameras in OBS upon OBS restart / exit
|
||||||
|
# #1. load/refresh uvcvideo before starting obs
|
||||||
|
# if lsmod | grep -q 'uvcvideo'; then
|
||||||
|
# sudo rmmod uvcvideo
|
||||||
|
# fi
|
||||||
|
# sudo modprobe uvcvideo
|
||||||
|
# #2. since no environment with a keyring to prompt for allowing virtual webcams prior is a must
|
||||||
|
# sudo modprobe v4l2loopback video_nr=10 card_label='OBS Virtual Camera'
|
||||||
|
# sleep 1
|
||||||
|
# sh -c "$obs_cmd --startvirtualcam || sleep 3; sudo rmmod uvcvideo"
|
||||||
|
# }
|
||||||
|
|
||||||
|
installed () {
|
||||||
|
command -v $1 > /dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
installed 'obs' && obs_cmd='obs'
|
||||||
|
installed 'obs-studio' && obs_cmd='obs-studio'
|
||||||
|
|
||||||
|
# obs executes this command when you start virtual camera
|
||||||
|
# sudo modprobe v4l2loopback exclusive_caps=1 card_label="OBS Virtual Camera"
|
||||||
|
|
||||||
|
# another version from one of links below
|
||||||
|
# sudo modprobe v4l2loopback video_nr=2 devices=1 card_label="OBS Virtual Camera"
|
||||||
|
|
||||||
|
sudo modprobe -r v4l2loopback || sudo rmmod v4l2loopback
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
sudo modprobe v4l2loopback video_nr=2 devices=1 card_label="OBS Virtual Camera"
|
||||||
|
if [[ $? == 0 ]]; then
|
||||||
|
$obs_cmd --startvirtualcam & disown
|
||||||
|
else
|
||||||
|
echo "Cannot run modprobe. Ensure v4l2loopback-dkms is installed and try again"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Cannot remove v4l2loopback device"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
48
tools/free-space.sh
Normal file
48
tools/free-space.sh
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Очистка места на диске
|
||||||
|
# https://gist.github.com/anthonyaxenov/02c00c965be4eb5bb163a153abdf4c2b
|
||||||
|
# https://itsfoss.com/free-up-space-ubuntu-linux/
|
||||||
|
|
||||||
|
df -h
|
||||||
|
echo ""
|
||||||
|
echo "[1/5] Removing apt caches and unused packages"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
sudo apt autoremove --purge
|
||||||
|
sudo apt autoclean
|
||||||
|
sudo apt clean
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "[2/5] Removing old journalctl logs"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
sudo journalctl --vacuum-time=1d
|
||||||
|
sudo rm -rf /var/log/journal/user-*@*
|
||||||
|
sudo rm -rf /var/log/journal/system*@*
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "[3/5] Cleaning user trash and thumbnails"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
rm -rf ~/.local/share/Trash/files/*
|
||||||
|
rm -rf ~/.cache/thumbnails/*
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "[4/5] Cleaning out dangling docker objects"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
docker system prune -f
|
||||||
|
# docker system prune -af
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "[5/5] Removing disabled unused snaps"
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
sudo snap list --all | awk '/disabled/{print $1, $3}' |
|
||||||
|
while read snapname revision; do
|
||||||
|
sudo snap remove "$snapname" --revision="$revision"
|
||||||
|
done
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
df -h
|
||||||
115
tools/frkn.sh
Executable file
115
tools/frkn.sh
Executable file
@@ -0,0 +1,115 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function disconnect() {
|
||||||
|
echo "Disconnecting: $1"
|
||||||
|
sudo wg-quick down "$1"
|
||||||
|
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
|
||||||
|
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1
|
||||||
|
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
function connect() {
|
||||||
|
echo "Connecting: frkn-$1"
|
||||||
|
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=0
|
||||||
|
sudo sysctl -w net.ipv6.conf.default.disable_ipv6=0
|
||||||
|
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||||
|
sudo wg-quick up "frkn-$1"
|
||||||
|
echo
|
||||||
|
}
|
||||||
|
|
||||||
|
function in_array() {
|
||||||
|
local find=$1
|
||||||
|
shift
|
||||||
|
for e in "$@"; do
|
||||||
|
[[ "$e" == "$find" ]] && return 0
|
||||||
|
done
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_wg() {
|
||||||
|
sudo apt install -y wireguard jq && wg --version
|
||||||
|
}
|
||||||
|
|
||||||
|
function update_frkn() {
|
||||||
|
local countries=(uk ru nl nl2 ch)
|
||||||
|
for idx in ${!countries[@]}; do
|
||||||
|
country=${countries[idx]}
|
||||||
|
echo "Downloading config for $country ($(expr $idx + 1)/${#countries[@]})"
|
||||||
|
|
||||||
|
json=$(curl -s "https://api.frkn.org/peer?location=$country" | jq)
|
||||||
|
|
||||||
|
iface_address=$(echo $json | jq -r .iface.address)
|
||||||
|
iface_privkey=$(echo $json | jq -r .iface.key)
|
||||||
|
iface_dns=$(echo $json | jq -r .iface.dns)
|
||||||
|
peer_pubkey=$(echo $json | jq -r .peer.pubkey)
|
||||||
|
peer_psk=$(echo $json | jq -r .peer.psk)
|
||||||
|
peer_allowed_ips=$(echo $json | jq -r .peer.allowed_ips)
|
||||||
|
peer_endpoint=$(echo $json | jq -r .peer.endpoint)
|
||||||
|
|
||||||
|
cat << EOF > "./frkn-$country.conf"
|
||||||
|
[Interface]
|
||||||
|
Address = $iface_address
|
||||||
|
DNS = $iface_dns
|
||||||
|
PrivateKey = $iface_privkey
|
||||||
|
|
||||||
|
[Peer]
|
||||||
|
PublicKey = $peer_pubkey
|
||||||
|
PresharedKey = $peer_psk
|
||||||
|
AllowedIPs = $peer_allowed_ips
|
||||||
|
Endpoint = $peer_endpoint
|
||||||
|
PersistentKeepalive = 25
|
||||||
|
EOF
|
||||||
|
done
|
||||||
|
sudo mv -f ./frkn-*.conf /etc/wireguard/
|
||||||
|
}
|
||||||
|
|
||||||
|
command="$1"
|
||||||
|
countries=()
|
||||||
|
current=$(sudo wg show | head -n 1 | awk '{print $2}')
|
||||||
|
|
||||||
|
for file in /etc/wireguard/*.conf; do
|
||||||
|
filename=${file/\/etc\/wireguard\/frkn-}
|
||||||
|
code=${filename/.conf/}
|
||||||
|
countries+=($code)
|
||||||
|
done
|
||||||
|
|
||||||
|
correct=-1
|
||||||
|
if [ -z "$command" ] ; then
|
||||||
|
while [ $correct -lt 0 ]; do
|
||||||
|
read -rp "Entry on of country code (${countries[*]}): " command
|
||||||
|
if in_array "$command" ${countries[@]}; then
|
||||||
|
correct=1
|
||||||
|
else
|
||||||
|
echo "Неверный код страны!"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$command" in
|
||||||
|
"update" )
|
||||||
|
if update_wg && update_frkn; then
|
||||||
|
echo "Wireguard and FRKN updated"
|
||||||
|
else
|
||||||
|
echo "Something went wrong"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"down" )
|
||||||
|
if [ -n "$current" ]; then
|
||||||
|
disconnect "$current"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
"show" )
|
||||||
|
sudo wg show
|
||||||
|
;;
|
||||||
|
|
||||||
|
* )
|
||||||
|
if [ -n "$current" ]; then
|
||||||
|
disconnect "$current"
|
||||||
|
fi
|
||||||
|
connect "$command"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
13
tools/ignore-veth.sh
Executable file
13
tools/ignore-veth.sh
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# https://forums.opensuse.org/t/networkmanager-shows-connection-to-lo/164441/13
|
||||||
|
# https://man.archlinux.org/man/NetworkManager.conf.5.en#Device_List_Format
|
||||||
|
# https://access.redhat.com/documentation/ru-ru/red_hat_enterprise_linux/8/html/configuring_and_managing_networking/configuring-networkmanager-to-ignore-certain-devices_configuring-and-managing-networking
|
||||||
|
|
||||||
|
sudo touch /etc/NetworkManager/conf.d/10-ignore-veth.conf
|
||||||
|
sudo tee <<EOF /etc/NetworkManager/conf.d/10-ignore-veth.conf > /dev/null
|
||||||
|
# Disable virtual interfaces to be managed via NetworkManager
|
||||||
|
[keyfile]
|
||||||
|
unmanaged-devices=interface-name:veth*
|
||||||
|
|
||||||
|
EOF
|
||||||
|
sudo systemctl reload NetworkManager
|
||||||
57
tools/inotifywait-cp.sh
Executable file
57
tools/inotifywait-cp.sh
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# My use case:
|
||||||
|
# syncthing synchronizes ALL changes in DCIM directory on my android to PC.
|
||||||
|
# I wanted files to be copied somewhere else on my PC to stay forever, so I
|
||||||
|
# could sort them later and safely free some space on mobile without loss.
|
||||||
|
# Also I wish to have some stupid log with history of such events.
|
||||||
|
|
||||||
|
# inotify-tools package must be installed!
|
||||||
|
|
||||||
|
# CHANGE THIS PARAMETERS to ones you needed
|
||||||
|
dir_src="$HOME/Syncthing/Mobile/Camera"
|
||||||
|
dir_dest="$HOME/some/safe/place"
|
||||||
|
dir_logs="$HOME/inotifywait-cp-logs"
|
||||||
|
regexp="[0-9]{8}_[0-9]{6}.*\.(jpg|mp4|gif)"
|
||||||
|
mkdir -p "$dir_dest" "$dir_logs"
|
||||||
|
|
||||||
|
print() {
|
||||||
|
echo -e "[`date '+%H:%M:%S'`] $*" \
|
||||||
|
| tee -a "$dir_logs/`date '+%Y%m%d'`.log"
|
||||||
|
}
|
||||||
|
|
||||||
|
copy () {
|
||||||
|
if [ -f "$dir_dest/$1" ]; then
|
||||||
|
print "SKIPPED:\t$dir_dest/$1"
|
||||||
|
else
|
||||||
|
cp "$dir_src/$1" "$dir_dest/$1"
|
||||||
|
print "COPIED:\t$dir_src/$1 => $dir_dest/$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
print "START\t========================="
|
||||||
|
|
||||||
|
# First, try to backup files synced since last exec of this script
|
||||||
|
ls -1 "$dir_src" \
|
||||||
|
| grep -E "^${regexp}$" \
|
||||||
|
| while read filename; do copy "$filename"; done
|
||||||
|
|
||||||
|
# Next, run inotifywait against source directory with args:
|
||||||
|
# --quiet -- print less (only print events)
|
||||||
|
# --monitor -- don't stop after first event (like infinite loop)
|
||||||
|
# --event -- first syncthing creates hidden file to write data into
|
||||||
|
# then renames it according to source file name, so here
|
||||||
|
# we listen to MOVED_TO event to catch final filename
|
||||||
|
# --format %f -- print only filename
|
||||||
|
# --include -- filename regexp to catch event from, ensure your $regexp
|
||||||
|
# is correct or remove line 53 to catch synced ALL files
|
||||||
|
|
||||||
|
inotifywait \
|
||||||
|
--quiet \
|
||||||
|
--monitor \
|
||||||
|
--event moved_to \
|
||||||
|
--format %f \
|
||||||
|
--include "$regexp" \
|
||||||
|
"$dir_src" \
|
||||||
|
| while read filename; do copy "$filename"; done
|
||||||
|
|
||||||
|
print "FINISH\t========================="
|
||||||
108
tools/quick-backup.sh
Executable file
108
tools/quick-backup.sh
Executable file
@@ -0,0 +1,108 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#####################################################################
|
||||||
|
# #
|
||||||
|
# Stupidly simple backup script for own projects #
|
||||||
|
# #
|
||||||
|
# Author: Anthony Axenov (Антон Аксенов) #
|
||||||
|
# Version: 1.0 #
|
||||||
|
# License: WTFPLv2 More info (RU): https://axenov.dev/?p=1234 #
|
||||||
|
# #
|
||||||
|
#####################################################################
|
||||||
|
|
||||||
|
# https://gist.github.com/anthonyaxenov/b8336a2bc9e6a742b5a050fa2588d71e
|
||||||
|
|
||||||
|
# database credentials ==============================================
|
||||||
|
|
||||||
|
DBUSER=
|
||||||
|
DBPASS=
|
||||||
|
DBNAME=
|
||||||
|
DBCHARSET="utf8"
|
||||||
|
|
||||||
|
# date formats ======================================================
|
||||||
|
|
||||||
|
FMT_DT_DIR="%Y.%m.%d" # 2021.03.19
|
||||||
|
FMT_DT_FILE="%H.%M" # 08.24
|
||||||
|
FMT_DT_LOG="%H:%M:%S" # 08:24:15.168149413
|
||||||
|
|
||||||
|
# local storage =====================================================
|
||||||
|
|
||||||
|
LOCAL_BAK_DIR="/backup/$(date +$FMT_DT_DIR)"
|
||||||
|
|
||||||
|
# database backup file
|
||||||
|
LOCAL_SQL_FILE="$(date +$FMT_DT_FILE)-db.sql.gz"
|
||||||
|
LOCAL_SQL_PATH="$LOCAL_BAK_DIR/$LOCAL_SQL_FILE"
|
||||||
|
|
||||||
|
# project path and backup file
|
||||||
|
LOCAL_SRC_DIR="/var/www/"
|
||||||
|
LOCAL_SRC_FILE="$(date +$FMT_DT_FILE)-src.tar.gz"
|
||||||
|
LOCAL_SRC_PATH="$LOCAL_BAK_DIR/$LOCAL_SRC_FILE"
|
||||||
|
|
||||||
|
# log file
|
||||||
|
LOG_FILE="$(date +$FMT_DT_FILE).log"
|
||||||
|
LOG_PATH="$LOCAL_BAK_DIR/$LOG_FILE"
|
||||||
|
|
||||||
|
log() {
|
||||||
|
echo -e "[$(date +$FMT_DT_LOG)] $*" | tee -a "$LOG_PATH"
|
||||||
|
}
|
||||||
|
|
||||||
|
# remote storage ====================================================
|
||||||
|
|
||||||
|
REMOTE_HOST="user@example.com"
|
||||||
|
REMOTE_BAK_DIR="/backup/$(date +$FMT_DT_DIR)"
|
||||||
|
REMOTE_SQL_PATH="$REMOTE_BAK_DIR/$LOCAL_SQL_FILE"
|
||||||
|
REMOTE_SRC_PATH="$REMOTE_BAK_DIR/$LOCAL_SRC_FILE"
|
||||||
|
REMOTE_LOG_PATH="$REMOTE_BAK_DIR/$LOG_FILE"
|
||||||
|
|
||||||
|
# start =============================================================
|
||||||
|
|
||||||
|
echo
|
||||||
|
log "Start ----------------------------------------------------------------"
|
||||||
|
log "Initialized parameters:"
|
||||||
|
log "\tDB_USER\t\t= $DB_USER"
|
||||||
|
log "\tDB_NAME\t\t= $DB_NAME"
|
||||||
|
log "\tDB_CHARSET\t= $DB_CHARSET"
|
||||||
|
log "\tLOCAL_SRC_DIR\t= $LOCAL_SRC_DIR"
|
||||||
|
log "\tLOCAL_SRC_PATH\t= $LOCAL_SRC_PATH"
|
||||||
|
log "\tLOCAL_SQL_PATH\t= $LOCAL_SQL_PATH"
|
||||||
|
log "\tLOG_PATH\t= $LOG_PATH"
|
||||||
|
log "\tREMOTE_HOST\t= $REMOTE_HOST"
|
||||||
|
log "\tREMOTE_SQL_PATH\t= $REMOTE_SQL_PATH"
|
||||||
|
log "\tREMOTE_SRC_PATH\t= $REMOTE_SRC_PATH"
|
||||||
|
log "\tREMOTE_LOG_PATH\t= $REMOTE_LOG_PATH"
|
||||||
|
|
||||||
|
mkdir -p $LOCAL_BAK_DIR
|
||||||
|
log "Created local dir: $LOCAL_BAK_DIR"
|
||||||
|
|
||||||
|
ssh $REMOTE_HOST mkdir -p $REMOTE_BAK_DIR
|
||||||
|
log "Created remote dir: $REMOTE_BAK_DIR"
|
||||||
|
|
||||||
|
log "1/4 Dumping DB: $DBNAME..."
|
||||||
|
mysqldump \
|
||||||
|
--user="$DBUSER" \
|
||||||
|
--password="$DBPASS" \
|
||||||
|
--default-character-set="$DBCHARSET" \
|
||||||
|
--opt \
|
||||||
|
--quick \
|
||||||
|
"$DBNAME" | gzip > "$LOCAL_SQL_PATH"
|
||||||
|
# --opt Same as --add-drop-table, --add-locks, --create-options,
|
||||||
|
# --quick, --extended-insert, --lock-tables, --set-charset,
|
||||||
|
# and --disable-keys
|
||||||
|
[ $? -gt 0 ] && log "ERROR: failed to create dump. Exit-code: $?" || log "\t- OK"
|
||||||
|
|
||||||
|
log "2/4 Sending database backup to $REMOTE_HOST..."
|
||||||
|
rsync --progress "$LOCAL_SQL_PATH" "$REMOTE_HOST:$REMOTE_SQL_PATH"
|
||||||
|
[ $? -gt 0 ] && log "ERROR: failed to send database backup. Exit-code: $?" || log "\t- OK"
|
||||||
|
|
||||||
|
log "3/4 Compressing project dir: $LOCAL_SRC_DIR..."
|
||||||
|
tar -zcf "$LOCAL_SRC_PATH" "$LOCAL_SRC_DIR"
|
||||||
|
[ $? -gt 0 ] && log "ERROR: failed to compress project. Exit-code: $?" || log "\t- OK"
|
||||||
|
|
||||||
|
log "4/4 Sending project backup to ${REMOTE_HOST}..."
|
||||||
|
rsync --progress "$LOCAL_SRC_PATH" "$REMOTE_HOST:$REMOTE_SRC_PATH"
|
||||||
|
[ $? -gt 0 ] && log "ERROR: failed to send project backup. Exit-code: $?" || log "\t- OK"
|
||||||
|
|
||||||
|
rsync --progress "$LOG_PATH" "$REMOTE_HOST:$REMOTE_LOG_PATH"
|
||||||
|
|
||||||
|
log "Finish!"
|
||||||
|
log "Used space: $(du -h "$LOCAL_BAK_DIR" | tail -n1)"
|
||||||
|
log "Free space: $(df -h | tail -n1 | awk '{print $4}')"
|
||||||
7
tools/rutracker.sh
Executable file
7
tools/rutracker.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
echo "# https://rutracker.net/forum/viewtopic.php?p=75274766#75274766" | sudo tee -a /etc/hosts # > /dev/null
|
||||||
|
echo "185.15.211.203 bt.t-ru.org" | sudo tee -a /etc/hosts # > /dev/null
|
||||||
|
echo "185.15.211.203 bt2.t-ru.org" | sudo tee -a /etc/hosts # > /dev/null
|
||||||
|
echo "185.15.211.203 bt3.t-ru.org" | sudo tee -a /etc/hosts # > /dev/null
|
||||||
|
echo "185.15.211.203 bt4.t-ru.org" | sudo tee -a /etc/hosts # > /dev/null
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://gist.github.com/anthonyaxenov/c16e1181d4b8a8644c57ec8a1f6cf21c
|
|
||||||
|
|
||||||
#########################################################################
|
#########################################################################
|
||||||
# #
|
# #
|
||||||
# Set display resolution #
|
# Set display resolution #
|
||||||
@@ -18,6 +15,8 @@
|
|||||||
# #
|
# #
|
||||||
#########################################################################
|
#########################################################################
|
||||||
|
|
||||||
|
# https://gist.github.com/anthonyaxenov/c16e1181d4b8a8644c57ec8a1f6cf21c
|
||||||
|
|
||||||
# Set display name to work with. You can get it via 'xrandr --listactivemonitors'
|
# Set display name to work with. You can get it via 'xrandr --listactivemonitors'
|
||||||
display="HDMI-2"
|
display="HDMI-2"
|
||||||
# Set width of this display in px
|
# Set width of this display in px
|
||||||
93
tools/ytdlcue.sh
Executable file
93
tools/ytdlcue.sh
Executable file
@@ -0,0 +1,93 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# CUE-sheet generator for youtube-dl
|
||||||
|
|
||||||
|
# Usage:
|
||||||
|
# 0. Install 'jq' utility
|
||||||
|
# 1. Download any audio file with metadata from YouTube or Youtube Music, e.g.
|
||||||
|
# $ youtube-dl \
|
||||||
|
# --extract-audio \
|
||||||
|
# --audio-format flac \
|
||||||
|
# --audio-quality 0 \
|
||||||
|
# --format bestaudio \
|
||||||
|
# --write-info-json \
|
||||||
|
# --output "/tmp/ytm/%(playlist_title)s/%(channel)s - %(title)s.%(ext)s" \
|
||||||
|
# https://www.youtube.com/watch?v=lVpDQnXz34M
|
||||||
|
#
|
||||||
|
# If audio file is already downloaded earlier then just fetch only its metadata:
|
||||||
|
# $ youtube-dl \
|
||||||
|
# --write-info-json \
|
||||||
|
# --skip-download \
|
||||||
|
# --output "/tmp/ytm/%(playlist_title)s/%(channel)s - %(title)s.%(ext)s" \
|
||||||
|
# https://www.youtube.com/watch?v=lVpDQnXz34M
|
||||||
|
#
|
||||||
|
# 2. Audio and metadata files MUST be named exactly similar (except extenstion),
|
||||||
|
# but it is not necessary to keep original names. Also they MUST be placed in
|
||||||
|
# the same directory. Example:
|
||||||
|
# /tmp/ytm/ABGT496.flac
|
||||||
|
# /tmp/ytm/ABGT496.info.json
|
||||||
|
#
|
||||||
|
# 3. To create CUE file run ytdlcue with a path to audio file:
|
||||||
|
# $ ytdlcue.sh /tmp/ytm/ABGT496.flac
|
||||||
|
#
|
||||||
|
# A new file will be created in the same directory:
|
||||||
|
# /tmp/ytm/ABGT496.cue
|
||||||
|
|
||||||
|
installed() {
|
||||||
|
command -v "$1" >/dev/null 2>&1
|
||||||
|
}
|
||||||
|
|
||||||
|
! installed 'jq' && {
|
||||||
|
echo "ERROR: you need to install jq!"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
audio_path="$1" # path to audiofile
|
||||||
|
audio_file=`basename "$audio_path"` # audiofile name with extension
|
||||||
|
audio_name=${audio_file%.*} # audiofile name without extension
|
||||||
|
audio_ext=${audio_file##*.} # audiofile name extension
|
||||||
|
path="`dirname "$audio_path"`/$audio_name" # path to audiofile and its name without ext
|
||||||
|
json_path="$path.info.json" # path to json file with metadata created by youtube-dl
|
||||||
|
cue_path="$path.cue" # path to cue sheet to be generated
|
||||||
|
|
||||||
|
# echo -e "audio_path:\t$audio_path"
|
||||||
|
# echo -e "audio_file:\t$audio_file"
|
||||||
|
# echo -e "audio_name:\t$audio_name"
|
||||||
|
# echo -e "audio_ext:\t$audio_ext"
|
||||||
|
# echo -e "path:\t\t$path"
|
||||||
|
# echo -e "json_path:\t$json_path"
|
||||||
|
# echo -e "cue_path:\t$cue_path"
|
||||||
|
|
||||||
|
[ ! -f "$audio_path" ] && {
|
||||||
|
echo "ERROR: File not found: $audio_path"
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
[ ! -f "$json_path" ] && {
|
||||||
|
echo "ERROR: File not found: $json_path"
|
||||||
|
exit 3
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "PERFORMER `cat "$json_path" | jq -Mc '.channel'`" > "$cue_path"
|
||||||
|
echo "TITLE `cat "$json_path" | jq -Mc '.title'`" >> "$cue_path"
|
||||||
|
echo "FILE \"$audio_file\" ${audio_ext^^}" >> "$cue_path"
|
||||||
|
|
||||||
|
counter=1 # track counter (works only inside loop!)
|
||||||
|
cat "$json_path" | jq -Mc '.chapters[]' \
|
||||||
|
| while read chapter; do
|
||||||
|
number=`printf %0.2d $counter` # pad current counter with zeros
|
||||||
|
time=`echo "$chapter" | jq -Mc '.start_time'` # get initial start time in seconds
|
||||||
|
time=`printf '%0.2d:%0.2d:00' $((time/60)) $((time%60))` # convert start time to minutes:seconds
|
||||||
|
title=`echo "$chapter" | jq -Mc '.title' | sed -r "s#[\"]##g"` # get initial chapter title
|
||||||
|
performer=`echo "$title" | cut -d "-" -f 1 | sed 's#^[[:space:]]*##g' | sed 's# *$##g'` # get and trim chapter's performer (before '-')
|
||||||
|
title2=`echo "$title" | cut -d "-" -f 2 | sed 's#^[[:space:]]*##g' | sed 's# *$##g'` # get and trim chapter's title (after '-')
|
||||||
|
#TODO: what if dash is not delimiter between performer and title?
|
||||||
|
#TODO: take $title2 if $performer and (or?) $title2 are empty
|
||||||
|
|
||||||
|
printf "%-2sTRACK $number AUDIO\n" >> "$cue_path"
|
||||||
|
printf "%-4sPERFORMER \"$performer\"\n" >> "$cue_path"
|
||||||
|
printf "%-4sTITLE \"$title2\"\n" >> "$cue_path"
|
||||||
|
printf "%-4sINDEX 01 $time\n" >> "$cue_path"
|
||||||
|
|
||||||
|
counter=`expr $counter + 1` # increase counter
|
||||||
|
done
|
||||||
|
echo "Done! Cue file:"
|
||||||
|
echo "$cue_path"
|
||||||
13
uninstall/apache2
Executable file
13
uninstall/apache2
Executable file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Uninstall apache2
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
sudo apt remove -y --autoremove apache2
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "apache2 uninstalled!"
|
||||||
|
echo
|
||||||
|
}
|
||||||
16
uninstall/docker
Executable file
16
uninstall/docker
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Uninstall docker + ppa
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Uninstalling docker + ppa..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
sudo apt remove -y docker*
|
||||||
|
|
||||||
|
rm -rf \
|
||||||
|
/etc/apt/sources.list.d/docker.list \
|
||||||
|
/etc/apt/keyrings/docker.gpg
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
19
uninstall/grub-customizer
Executable file
19
uninstall/grub-customizer
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Uninstall grub-customizer with ppa
|
||||||
|
source `dirname $0`/../helpers || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
source_file="/etc/apt/sources.list.d/$(ls -1 /etc/apt/sources.list.d/ | grep danielrichter2007)"
|
||||||
|
|
||||||
|
sudo apt remove -y --autoremove grub-customizer && \
|
||||||
|
[ -f "$source_file" ] && {
|
||||||
|
sudo rm "$source_file" && \
|
||||||
|
sudo apt update
|
||||||
|
}
|
||||||
|
|
||||||
|
[ $? = 0 ] && {
|
||||||
|
echo
|
||||||
|
success "grub-customizer uninstalled!"
|
||||||
|
echo
|
||||||
|
}
|
||||||
16
uninstall/lazynvim
Executable file
16
uninstall/lazynvim
Executable file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -eo pipefail
|
||||||
|
trap ontrap SIGINT SIGTERM SIGSTOP
|
||||||
|
|
||||||
|
ontrap() {
|
||||||
|
echo
|
||||||
|
echo "[!] Interrupted"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "[*] Uninstalling neovim"
|
||||||
|
|
||||||
|
find "$HOME/.config" -type f -path "*/nvim*" -exec rm -rfv {} +
|
||||||
|
find "$HOME/.local" -type f -path "*/nvim*" -exec rm -rfv {} +
|
||||||
|
|
||||||
|
echo "[*] Finish"
|
||||||
23
uninstall/lite-xl
Executable file
23
uninstall/lite-xl
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Uninstall lite-xl
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Uninstalling lite-xl..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
set -x
|
||||||
|
rm -rf \
|
||||||
|
"$HOME/.local/bin/lite-xl" \
|
||||||
|
"$HOME/.local/share/applications/org.lite_xl.lite_xl.desktop" \
|
||||||
|
"$HOME/.local/share/lite-xl" \
|
||||||
|
"$HOME/.config/lite-xl"
|
||||||
|
|
||||||
|
sudo update-desktop-database && \
|
||||||
|
xdg-desktop-menu forceupdate
|
||||||
|
|
||||||
|
set +x
|
||||||
|
echo
|
||||||
|
echo "Finish!"
|
||||||
|
echo
|
||||||
11
uninstall/omz
Executable file
11
uninstall/omz
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
##makedesc: Uninstall omz
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Uninstalling omz..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
bash $ZSH/tools/uninstall.sh
|
||||||
|
exec bash
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user