161 Commits
Author SHA1 Message Date
anthony be697989f2 gitignore updated 2026-07-15 23:14:02 +08:00
anthony 3f2b5af467 papirus moved to /usr/share/icons 2026-07-15 23:13:06 +08:00
anthony 8b65497cac uv 2026-07-15 23:12:40 +08:00
anthony da17239d7d wip3 2026-07-10 15:11:51 +08:00
anthony 8bfcf23bc2 Merge branch 'refactor2' of git.axenov.dev:anthony/shell into refactor2 2026-07-06 15:38:50 +08:00
anthony a167f2f393 nodejs nvm for macos 2026-03-29 00:36:48 +08:00
anthony 7112296339 nerd-fonts misc 2026-03-29 00:14:29 +08:00
anthony 721b69b3f9 nerd-fonts for mac 2026-03-25 23:57:42 +08:00
anthony 3b08921824 Makefile update 2026-03-24 00:35:17 +08:00
anthony 0df1b31065 docker-model-plugin 2026-03-24 00:34:34 +08:00
anthony 7fb1b37e4f ollama 2026-03-24 00:33:45 +08:00
anthony 1c66ce8946 llmfit 2026-03-24 00:33:33 +08:00
anthony 93aba39cbe brew 2026-03-24 00:33:16 +08:00
anthony 6e4c5eee38 wip4 2026-03-09 09:54:53 +08:00
anthony d13a8a44d1 change-amd-driver added 2026-02-16 17:26:38 +08:00
anthony edac0e49c4 ddns scripts updated 2026-02-16 17:25:18 +08:00
anthony 642522a01d frkn removed 2026-02-16 17:24:42 +08:00
anthony daa8df5c77 fix postman icon in desktop file 2026-02-16 17:22:49 +08:00
anthony 43f1613396 wip 2025-11-14 10:45:09 +08:00
anthony c7449f4acb tools -> scripts 2025-11-14 10:44:57 +08:00
anthony 0493f18b18 Dotfiles moved to another repo: https://git.axenov.dev/anthony/dotfiles 2025-11-14 10:43:47 +08:00
anthony b8ca9a8dad zshrc and xcompose 2025-11-03 21:21:31 +08:00
anthony 549b420df2 Добавлен vacuum 2025-10-30 06:00:39 +00:00
anthony edf76874fc misc 2025-10-12 18:25:13 +08:00
anthony 95ad6b0c6a rustdesk 1.4.2 2025-10-12 18:24:30 +08:00
anthony ff36975eb7 frkn deprecated 2025-07-10 23:46:19 +08:00
anthony 5ae19346d6 wine misc, albert removed 2025-07-09 00:15:25 +08:00
anthony 53ee621747 duckdns improved 2025-07-08 23:50:53 +08:00
anthony dd339f2939 duckdns misc 2025-07-05 10:23:59 +08:00
anthony e0fbdf852e duckdns 2025-07-02 13:29:40 +08:00
anthony b5983ed308 sublime text 4200 2025-06-21 22:48:29 +08:00
anthony f39af6d446 makefile 2025-06-18 19:51:07 +08:00
anthony 8fe3d112ba Merge branch 'master' of git.axenov.dev:anthony/shell 2025-06-18 19:50:45 +08:00
anthony 4c81bcea73 rustdesk flatpak + kde permission 2025-06-18 19:50:28 +08:00
anthony 5623d08d85 suld 2025-05-23 00:19:28 +08:00
anthony 0a369efe1b Merge branch 'master' of git.axenov.dev:anthony/shell 2025-05-21 20:26:41 +08:00
anthony 1640ebfb45 neovim + lazyvim 2025-05-21 20:26:23 +08:00
anthony d2c561fc28 upgraded lite-xl 2025-05-19 00:30:08 +08:00
anthony a920e48422 Revert "telebit misc"
This reverts commit abad965e9a.
2025-05-18 23:54:02 +08:00
anthony 0ed07de2d2 php misc 2025-05-18 23:27:42 +08:00
anthony abad965e9a telebit misc 2025-05-18 23:27:19 +08:00
anthony b5b0140e34 vscode repo 2025-05-14 23:42:02 +08:00
anthony 5d75b6f79e vivaldi repo + install 2025-05-14 23:41:50 +08:00
anthony 87fd722509 albert draft 2025-05-14 19:58:43 +08:00
anthony eaacecd87a ulauncher update 2025-05-14 18:51:18 +08:00
anthony 4c57a180ac sublimetext update 2025-05-14 18:49:44 +08:00
anthony 96bd945ef2 disable-ipv6 2025-03-29 18:58:45 +08:00
anthony 49fd27d3be display-rotate 2025-03-29 18:56:46 +08:00
anthony 3c9f1d71cb flameshot build form src 2025-03-24 19:48:25 +08:00
anthony 3a226ed5bb git helpers misc 2025-03-24 19:47:30 +08:00
anthony fe83b3eb25 readme update 2025-03-24 19:46:01 +08:00
anthony a34dda20c7 uninstall wine 2025-03-24 17:21:08 +08:00
anthony 021db1064e ubuntu tools misc 2025-03-19 19:08:19 +08:00
anthony b70b89433b Merge branch 'master' of git.axenov.dev:anthony/shell 2025-03-18 13:45:33 +08:00
anthony 8531543982 make-swapfile 2025-03-18 13:45:29 +08:00
anthony e05b47ae52 ubuntu server scripts misc 2025-02-20 10:22:39 +08:00
anthony e9a6f4ddda docker-volume-snapshot 2025-02-20 10:22:25 +08:00
anthony cbb493b5c4 ClamAV (WIP) 2025-02-10 21:32:52 +08:00
anthony 31ddf3a6d2 notification helpers 2025-02-10 21:30:36 +08:00
anthony 47827282a9 free-space misc 2025-02-10 21:30:24 +08:00
anthony 16075cdd61 new links in readme 2025-02-08 13:25:52 +08:00
anthony 29e5c960de docker, network and others 2025-02-08 13:25:41 +08:00
anthony 526dade1f8 new help examples 2025-02-08 13:24:30 +08:00
anthony 66126167c8 io misc 2025-02-08 13:23:48 +08:00
anthony 3696cc06af new traps example 2025-02-08 13:23:32 +08:00
anthony 8da2059d1e basic.sh new functions 2025-02-08 13:19:16 +08:00
anthony 9da84a69f2 free-space misc 2025-02-08 12:10:23 +08:00
anthony 50bd28abe4 io misc 2025-02-05 18:58:42 +08:00
anthony bbbc0de694 arg() снова исправлен вызов tr 2025-01-29 19:50:52 +08:00
anthony 9258398be4 Merge branch 'master' of git.axenov.dev:anthony/shell 2025-01-27 15:10:30 +08:00
anthony a60374033c arg() исправлен вызов tr 2025-01-27 15:10:18 +08:00
anthony bcae2fb4cf dotfiles misc 2025-01-21 00:06:37 +08:00
anthony c808cce9cd sublime text dotfiles 2025-01-21 00:05:57 +08:00
anthony bacd71304a Merge branch 'master' of git.axenov.dev:anthony/shell 2025-01-20 16:11:56 +08:00
anthony 6fee688968 arg-parser -- fix utf8 2025-01-20 16:11:46 +08:00
anthony ebd30c8a50 youtube-dl misc 2025-01-18 00:46:27 +08:00
anthony c4b2af8073 new shebangs 2025-01-17 19:07:28 +08:00
anthony 45499ca5df args-parser refactor 2025-01-17 19:07:08 +08:00
anthony 53d5a31a30 many io misc useful updates 2025-01-16 14:23:46 +08:00
anthony 1e0d54f5d6 some basic helpers 2025-01-16 14:23:19 +08:00
anthony 5d3004c87b docker helpers 2025-01-16 13:39:16 +08:00
anthony 14f3f2caf2 arg-parser fixes 2025-01-16 13:39:02 +08:00
anthony dc03b5f577 sublime merge 2102 + misc 2025-01-09 15:38:31 +08:00
anthony 2af5282e64 st4 4189 2024-12-26 00:49:56 +08:00
anthony e2c0d1de87 wip 2024-12-02 16:12:18 +08:00
anthony 7bb8a8c839 Merge branch 'master' of git.axenov.dev:anthony/my-env 2024-11-24 14:47:02 +08:00
anthony bc139e5cc5 st4 upgrade 2024-11-24 14:46:56 +08:00
anthony beeb59b1aa vscode fix 2024-11-22 14:43:22 +08:00
anthony 3249c32cb2 Merge branch 'master' of git.axenov.dev:anthony/my-env 2024-11-22 14:38:43 +08:00
anthony c18f014119 golang 1.23.0 2024-11-22 14:38:38 +08:00
anthony d41f6505b9 todo list 2024-11-22 09:41:16 +08:00
anthony c4c7d298e0 vscode deb 2024-11-22 09:41:05 +08:00
anthony e95ccf042b lazynvim WIP 2024-11-22 09:32:36 +08:00
anthony 1a912bf645 frkn tool -- toggle ipv6 on (dis)connect 2024-11-22 09:32:22 +08:00
anthony 1c2abec8a7 Helpers fixes 2024-11-22 09:31:53 +08:00
anthony a71b682f49 free-space tool 2024-09-08 11:33:09 +08:00
anthony df826ba9c9 Update command for FRKN tool 2024-09-06 01:12:49 +08:00
anthony 737da43522 Updated frkn tool 2024-08-27 14:40:29 +08:00
anthony 890f09b82b frkn tool script for quick connection control 2024-08-26 16:22:03 +08:00
anthony 4b1bd30170 frkn 2024-08-02 00:03:57 +08:00
anthony 5842b954e3 sublime text 4169 2024-08-01 00:05:38 +08:00
anthony a52ce34748 makefile 2024-07-31 23:40:56 +08:00
anthony 024b3311e0 uninstall scripts 2024-07-31 23:40:43 +08:00
anthony 22d12fd902 tools/ignore-veth.sh 2024-07-31 23:37:57 +08:00
anthony def4f6761a dotfiles misc 2024-07-31 23:37:18 +08:00
anthony ed10ab05d4 misc 2024-07-31 23:36:46 +08:00
anthony b6817506e0 telegram misc 2024-07-31 23:36:15 +08:00
anthony 479ac2064f postman rework 2024-07-31 23:36:02 +08:00
anthony 4014f83402 php tools misc 2024-07-31 23:35:38 +08:00
anthony bf970f58cd pgsql rework 2024-07-31 23:32:46 +08:00
anthony 7159850e83 papirus rework 2024-07-31 23:31:16 +08:00
anthony 3ef8692684 openvpn rework 2024-07-31 23:29:58 +08:00
anthony efa60f5231 kde-backports misc 2024-07-31 23:29:37 +08:00
anthony ee8cbd0fe4 jbmono misc 2024-07-31 23:27:06 +08:00
anthony 3c87f837eb grubc rename 2024-07-31 23:26:44 +08:00
anthony 6d7719d568 golang rework 2024-07-31 23:26:27 +08:00
anthony e9638e845c git rework 2024-07-31 23:26:12 +08:00
anthony b2cf7c154e flameshot 2024-07-31 23:25:51 +08:00
anthony b988524c2d droidcam rework 2024-07-31 23:25:11 +08:00
anthony a73a442f07 docker rework 2024-07-31 23:24:10 +08:00
anthony f9f8f5b2dc composer reworked 2024-07-31 23:23:55 +08:00
anthony 79db21f336 chrome misc 2024-07-31 23:23:33 +08:00
anthony bb78d67565 canon-mg2500 misc 2024-07-31 23:23:19 +08:00
anthony 8b9aecc754 apt misc 2024-07-31 23:18:15 +08:00
anthony f3f6e8fd31 apache misc 2024-07-31 23:15:48 +08:00
anthony 5bf67b1c8e helpers misc 2024-07-31 23:14:53 +08:00
anthony 9baedd438f Обновить dotfiles/etc/docker/daemon.json 2024-06-03 10:51:58 +00:00
anthony 49595c7df5 docker mirrors 2024-05-31 00:13:37 +08:00
anthony 8ad20ca7fd apache2 + helpers 2023-04-12 22:11:17 +08:00
anthony 7cc6888cca Merge branch 'master' of git.axenov.dev:anthony/my-env 2023-04-12 21:50:46 +08:00
anthony 19d9f17f77 testing new helper functions in jbmono 2023-04-12 19:06:42 +08:00
anthony 86c7c92ae0 fixes in makefile generation 2023-04-12 19:05:12 +08:00
anthony 4670ee9b57 makefile updated 2023-04-12 17:03:00 +08:00
anthony c261d62b36 new jetbrains mono fonts installer 2023-04-12 17:00:41 +08:00
anthony acc7907a72 fix-obs-vcam revamped 2023-04-12 16:47:46 +08:00
anthony ba9c1bf28d git_aliases 2023-04-12 08:57:04 +08:00
anthony 7fcf9ad9e6 corrected kde-backports 2023-04-11 23:49:00 +08:00
anthony 84822bd7fa papirus speedup 2023-04-11 23:48:36 +08:00
anthony 99ffbf68f8 minus sqlitebrowser from apt 2023-04-11 23:48:24 +08:00
anthony a5388f5127 telegram from official website 2023-04-11 23:47:43 +08:00
anthony 3339928940 youtube-dl from sources 2023-04-11 23:45:41 +08:00
anthony bc0a2e4426 some finish messages 2023-04-11 23:43:14 +08:00
anthony 805716e9b4 youtube-dl wget without sudo 2023-04-11 14:51:36 +00:00
anthony be8d9ab4a6 rustdesk fix 2023-03-10 13:55:26 +08:00
anthony 3bb7ec3564 php fixes 2023-03-10 13:55:10 +08:00
anthony 01896666f2 Merge branch 'master' of git.axenov.dev:anthony/my-env 2023-02-01 22:30:10 +08:00
anthony aaec3096f9 vivaldi uninstall 2023-02-01 22:29:23 +08:00
anthony 46ca617c1a docker misc 2023-02-01 22:29:02 +08:00
anthony 90dc1b4d8b Revert "Descriptions parsing improved" (c1150af9) + php tools fixes 2022-12-28 15:20:25 +08:00
anthony f89b2d946d nodejs (nvm/npm) rework 2022-12-21 22:07:05 +08:00
anthony 0aac460d63 makefile misc + generator 2022-12-11 14:48:52 +08:00
anthony aab50b0401 php refactored and new tools 2022-12-11 14:48:30 +08:00
anthony 28692bfcf5 unzip -oq 2022-12-11 14:32:18 +08:00
anthony 2d2380fd62 open sans 2022-12-10 22:13:09 +08:00
anthony f20a161373 Merge branch 'master' of git.axenov.dev:anthony/my-env 2022-12-10 21:59:53 +08:00
anthony 3a853564c1 phptools 2022-12-10 21:59:01 +08:00
anthony 5abc1c9434 papirus misc 2022-12-10 21:58:53 +08:00
anthony 7136fac018 dots misc 2022-12-10 21:58:38 +08:00
anthony 7554e57ea4 Merge branch 'master' of git.axenov.dev:anthony/my-env 2022-11-30 17:51:34 +08:00
anthony e6411438c5 openvpn 2022-11-30 17:51:28 +08:00
anthony e86281c967 git_aliases misc 2022-11-30 17:51:21 +08:00
100 changed files with 3910 additions and 2083 deletions
+3
View File
@@ -1,2 +1,5 @@
.DS_Store
*.bak *.bak
*.log *.log
.env
*.env*
+335 -125
View File
@@ -1,214 +1,418 @@
# Autogenerated at 09.10.2022 12:57 using ./gen-makefile # Autogenerated at 10.07.2026 15:03 using ./gen-makefile
.DEFAULT_GOAL := help .DEFAULT_GOAL := help
#===============================================
# Scripts listed in ./packs
#===============================================
# [PACK] php + composer
composer: php composer-clean
# [TODO] [PACK] qt5 + flameshot from source
flameshot: qt5 flameshot-build
# [PACK] Apache + php + mariadb
lamp: apache php mariadb
# [PACK] OBS Studio + droidcam-obs
obs: obs-studio droidcam-obs
# [PACK] zsh + omz + powerline10k + MesloLGS font
omz: zsh omz-clean omz-fancy
chsh -s /usr/bin/zsh
@exec zsh
#=============================================== #===============================================
# Scripts listed in ./install # Scripts listed in ./install
#=============================================== #===============================================
# Install apache2 (latest) ##anytype: Manage anytype (deb)
apache: anytype:
@./install/apache @./install/anytype install
# Install bunch of software from apt ##apache2: Manage apache2 (apt)
apache2:
@./install/apache2 install
##apt: Install basic software from apt
apt: apt:
@./install/apt @./install/apt install
# Install Canon Pixma MG2500 + ppa ##brew: Install software from brew
brew:
@./install/brew install
##canon-mg2500: Canon Pixma MG2500 + ppa
canon-mg2500: canon-mg2500:
@./install/canon-mg2500 @./install/canon-mg2500 install
# Install google chrome (latest) ##chrome: Google Chrome (latest)
chrome: chrome:
@./install/chrome @./install/chrome install
# Install composer (latest) ##clamav: ClamAV
composer-clean: clamav:
@./install/composer-clean @./install/clamav install
# Install docker (latest) + docker-compose (latest) + ppa ##composer: Install composer (latest)
composer:
@./install/composer install
##docker: Docker + ppa
docker: docker:
@./install/docker @./install/docker install
# Install dotfiles ##droidcam: Install droidcam v1.9.0
dots:
@./install/dots
# Install droidcam v1.8.2
droidcam: droidcam:
@./install/droidcam @./install/droidcam install
# 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 install
# [TODO] Build flameshot from src (latest) ##_example: Example script
flameshot-build: _example:
@./install/flameshot-build @./install/_example install
# Install git (latest) ##flameshot: Install flameshot (latest)
flameshot:
@./install/flameshot install
##git: Install git (latest)
git: git:
@./install/git @./install/git install
# Install golang v1.18.3 ##golang: Install golang
golang: golang:
@./install/golang @./install/golang install
# Install grub-customizer (latest) + ppa ##grub-customizer: Install grub-customizer (latest + ppa)
grubc: grub-customizer:
@./install/grubc @./install/grub-customizer install
# Install KDE Window AppMenu Applet ##kde-appmenu: Install KDE Window AppMenu Applet
kde-appmenu: kde-appmenu:
@./install/kde-appmenu @./install/kde-appmenu install
# Install KDE Backports + ppa ##kde-backports: Install KDE Backports
kde-backports: kde-backports:
@./install/kde-backports @./install/kde-backports install
# Install file templates (KDE) ##kde-file-templates: Install file templates (KDE)
kde-file-templates: kde-file-templates:
@./install/kde-file-templates @./install/kde-file-templates install
# Install KDE portal ##kde-portal: Install KDE portal
kde-portal: kde-portal:
@./install/kde-portal @./install/kde-portal install
# Install libreoffice ##keyd: Install keyd
keyd:
@./install/keyd install
##libreoffice: Install libreoffice
libreoffice: libreoffice:
@./install/libreoffice @./install/libreoffice install
# Install lite-xl v2.0.5 (draft) ##lite-xl: Install lite-xl v2.1.7
lite-xl: lite-xl:
@./install/lite-xl @./install/lite-xl install
# Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed) ##llmfit: Install llmfit
llmfit:
@./install/llmfit install
##mariadb: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed)
mariadb: mariadb:
@./install/mariadb @./install/mariadb install
# Install nodejs + npm via nvm ##nerd-fonts: Install nerd-fonts
nerd-fonts:
@./install/nerd-fonts install
##nodejs: Install nodejs + npm via nvm
nodejs: nodejs:
@./install/nodejs @./install/nodejs install
# Install ntfy (latest) + ppa ##ntfy: Install ntfy (latest) + ppa
ntfy: ntfy:
@./install/ntfy @./install/ntfy install
# Install obs-studio (latest snap) ##nvim: Install nvim + lazyvim
nvim:
@./install/nvim install
##obs-studio: Install obs-studio (latest snap)
obs-studio: obs-studio:
@./install/obs-studio @./install/obs-studio install
# Install omz (latest) ##ollama: Install ollama
ollama:
@./install/ollama install
##omz-clean: Install omz (latest)
omz-clean: omz-clean:
@./install/omz-clean @./install/omz-clean install
# Install omz fancy (powerline10k + MesloLGS font) ##omz-fancy: Install omz fancy (powerline10k + MesloLGS font)
omz-fancy: omz-fancy:
@./install/omz-fancy @./install/omz-fancy install
# Install papirus-icon-theme (latest) ##openvpn: Install openvpn v2.6.3 (src)
openvpn:
@./install/openvpn install
##papirus: Install papirus-icon-theme (latest)
papirus: papirus:
@./install/papirus @./install/papirus install
# 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 install
# Install php v8.1 + ppa ##php: Install php v8.4
php: php:
@./install/php @./install/php install
# Install postman (latest) ##phpcs: Install phpcs + php-cs-fixer
phpcs:
@./install/phpcs install
##phpmd: Install phpmd
phpmd:
@./install/phpmd install
##php-psalm: Install psalm
php-psalm:
@./install/php-psalm install
##php-spx: Install php-spx
php-spx:
@./install/php-spx install
##phpstan: Install phpstan
phpstan:
@./install/phpstan install
##phpunit: Install phpunit
phpunit:
@./install/phpunit install
##postman: Install postman (latest)
postman: postman:
@./install/postman @./install/postman install
# Install qt5 ##qt5: Install qt5
qt5: qt5:
@./install/qt5 @./install/qt5 install
# Install rustdesk client v1.1.9 (deb) ##rustdesk: Install rustdesk client v1.4.2 (deb)
rustdesk: rustdesk:
@./install/rustdesk @./install/rustdesk install
# Install bunch of software from snap ##snap: Install bunch of software from snap
snap: snap:
@./install/snap @./install/snap install
# Install syncthing (latest) + ppa ##sublimemerge: Install Sublime Merge
sublimemerge:
@./install/sublimemerge install
##sublimetext: Install Sublime Text
sublimetext:
@./install/sublimetext install
##suld: Samsung Unified Linux Driver repo
suld:
@./install/suld install
##syncthing: Install syncthing (latest) + ppa
syncthing: syncthing:
@./install/syncthing @./install/syncthing install
# Install telebit (latest) ##telebit: Install telebit (latest)
telebit: telebit:
@./install/telebit @./install/telebit install
# Install ulauncher (latest) + ppa ##telegram: Install telegram (latest)
telegram:
@./install/telegram install
##tilt: Install tilt (k8s dev env)
tilt:
@./install/tilt install
##ulauncher: Install ulauncher (latest) + ppa
ulauncher: ulauncher:
@./install/ulauncher @./install/ulauncher install
# Install Vivaldi + ppa ##vivaldi: Install Vivaldi + ppa
vivaldi: vivaldi:
@./install/vivaldi @./install/vivaldi install
# Install wine (latest) + ppa (focal) ##vscode: VSCode deb-package
vscode:
@./install/vscode install
##wine: Install wine (latest) + ppa
wine: wine:
@./install/wine @./install/wine install
# Install youtube-dl + ytdlcue ##youtube-dl: Install youtube-dl (src)
youtube-dl: youtube-dl:
@./install/youtube-dl @./install/youtube-dl install
# Install ytdlcue ##ytdlcue: Install ytdlcue
ytdlcue: ytdlcue:
@./install/ytdlcue @./install/ytdlcue install
# Install zint (latest) ##zint: Install zint (latest)
zint: zint:
@./install/zint @./install/zint install
# Install vanilla zsh ##zsh: Install vanilla zsh
zsh: zsh:
@./install/zsh @./install/zsh install
#=============================================== #===============================================
# Scripts listed in ./upgrade # Scripts listed in ./packs
#=============================================== #===============================================
# Upgrade omz ##lamp: [PACK] Apache + php + mariadb
^omz: lamp: apache phpstack mariadb
@./upgrade/omz
##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, phpmd)
phptools: composer php-psalm phpcs phpmd phpstan phpunit
##phpstack: [PACK] Install full php stack with tooling
phpstack: php phptools
#=============================================== #===============================================
# Scripts listed in ./uninstall # Upgrade targets (use install script with 'upgrade' arg)
#=============================================== #===============================================
# Uninstall docker ##^apache2: Manage apache2 (apt)
^apache2:
@./install/apache2 upgrade
##^apt: Install basic software from apt
^apt:
@./install/apt upgrade
##^canon-mg2500: Canon Pixma MG2500 + ppa
^canon-mg2500:
@./install/canon-mg2500 upgrade
##^chrome: Google Chrome (latest)
^chrome:
@./install/chrome upgrade
##^clamav: ClamAV
^clamav:
@./install/clamav upgrade
##^composer: Install composer (latest)
^composer:
@./install/composer upgrade
##^docker: Docker + ppa
^docker:
@./install/docker upgrade
##^golang: Install golang
^golang:
@./install/golang upgrade
##^keyd: Install keyd
^keyd:
@./install/keyd upgrade
##^llmfit: Install llmfit
^llmfit:
@./install/llmfit upgrade
##^omz-clean: Install omz (latest)
^omz-clean:
@./install/omz-clean upgrade
#===============================================
# Remove targets (use install script with 'remove' arg)
#===============================================
##/anytype: Manage anytype (deb)
/anytype:
@./install/anytype remove
##/apache2: Manage apache2 (apt)
/apache2:
@./install/apache2 remove
##/canon-mg2500: Canon Pixma MG2500 + ppa
/canon-mg2500:
@./install/canon-mg2500 remove
##/chrome: Google Chrome (latest)
/chrome:
@./install/chrome remove
##/clamav: ClamAV
/clamav:
@./install/clamav remove
##/composer: Install composer (latest)
/composer:
@./install/composer remove
##/docker: Docker + ppa
/docker: /docker:
@./uninstall/docker @./install/docker remove
# Uninstall omz ##/golang: Install golang
/omz: /golang:
@./uninstall/omz @./install/golang remove
##/grub-customizer: Install grub-customizer (latest + ppa)
/grub-customizer:
@./install/grub-customizer remove
##/keyd: Install keyd
/keyd:
@./install/keyd remove
##/lite-xl: Install lite-xl v2.1.7
/lite-xl:
@./install/lite-xl remove
##/llmfit: Install llmfit
/llmfit:
@./install/llmfit remove
##/nerd-fonts: Install nerd-fonts
/nerd-fonts:
@./install/nerd-fonts remove
##/nodejs: Install nodejs + npm via nvm
/nodejs:
@./install/nodejs remove
##/nvim: Install nvim + lazyvim
/nvim:
@./install/nvim remove
##/ollama: Install ollama
/ollama:
@./install/ollama remove
##/omz-clean: Install omz (latest)
/omz-clean:
@./install/omz-clean remove
##/rustdesk: Install rustdesk client v1.4.2 (deb)
/rustdesk:
@./install/rustdesk remove
##/sublimemerge: Install Sublime Merge
/sublimemerge:
@./install/sublimemerge remove
##/sublimetext: Install Sublime Text
/sublimetext:
@./install/sublimetext remove
##/vivaldi: Install Vivaldi + ppa
/vivaldi:
@./install/vivaldi remove
##/wine: Install wine (latest) + ppa
/wine:
@./install/wine remove
#=============================================== #===============================================
# Service goals # Service goals
@@ -216,13 +420,19 @@ zsh:
self: self:
@./gen-makefile @./gen-makefile
help: Makefile help: Makefile
@echo "Ubuntu software installator" @echo "Ubuntu software installator"
@echo @echo
@echo "Usage:\n make help|- show this help\n make self|- regenerate Makefile (alias of ./gen-makefile)\n make GOAL|- install software\n make ^GOAL|- upgrade software\n make /GOAL|- uninstall software" | column -ts '|' @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 ^GOAL\t - upgrade software"
@echo "\tmake /GOAL\t - uninstall software"
@echo "\nYou can combine GOALs, here are some examples:" @echo "\nYou can combine GOALs, here are some examples:"
@echo "\tmake @docker docker" @echo "\tmake /docker docker"
@echo "\tmake php @docker ^omz" @echo "\tmake php /docker ^omz"
@echo "\nAvailable GOALs:" @echo "\nAvailable GOALs:"
@sed -n '/^#/{N;s/# *\(.*\)\n\([^# .].*:\)/\t\2\1/p}' $< | column -ts ':' @sed -n 's/^##//p' $< | column -ts ':' | sed -e "s/^/\t/"
+%:
@make
+52 -46
View File
@@ -1,62 +1,50 @@
# My Ubuntu environment # My shell environment
`make`-ready bunch of scripts for easily installation of different software. `make`-ready bunch of scripts for easily (de)installation of different software and bunch of useful handy functions for custom scripting.
## Requirements ## Requirements
* Ubuntu >= 20.04 (not tested with version < 20) * Ubuntu >= 20.04 (not tested with version < 20)
* `bash`, `zsh` or other POSIX-compatible shell * `bash`, `zsh` or other `sh`-compatible shell
* `make` (optional but recommended) * `make` (optional but recommended)
* `wget` (necessary for some scripts) * `wget` (required for some scripts)
* `git` (necessary for some scripts) * `git` (required for some scripts)
If some dependecies are missed for some of these scripts it is enougth to run `./install/apt` in most cases. If some dependencies are missed for some of these scripts, it is enough to run `./install/apt` in most cases; otherwise the script will suggest (or even install) them.
## Usage ## Usage
### Clone this repo (recommended)
```shell ```shell
# if git is installed # with git
git clone git@git.axenov.dev:anthony/my-env.git --depth=1 git clone git@git.axenov.dev:anthony/shell.git --depth=1 --single-branch
# if git is not installed # without git
wget -qO - https://git.axenov.dev/anthony/my-env/archive/master.tar.gz | tar -zxf - wget -qO - https://git.axenov.dev/anthony/shell/archive/master.tar.gz | tar -zxf -
# switch to repo dir
cd my-env
# generate fresh ./Makefile and get full list of `make` goals
./gen-makefile
# get full list of `make` goals # get full list of `make` goals
make cd shell && make
```
### Selective straightforward installation
```shell
# from remote file (you can meet interaction bugs this way!)
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt | bash
# from locally cloned repo (except scripts from ./packs)
./install/apt
``` ```
## How to add my script? ## How to add my script?
1. Create a new shell script in `./install`, `./upgrade` or `./uninstall` directory. 1. Create a new shell script in `./install` directory.
At the beggining of a file you must write these two lines: At the beginning of a file you must write these two lines:
```shell ```shell
#!/bin/bash #!/usr/bin/env bash
##makedesc: Your description for Makefile ##makedesc: Your description for Makefile
``` ```
2. Make this script executable, e.g.: 2. Implement `install()`, `upgrade()` and/or `remove()` functions with `set -eo pipefail` and a trailing `case "$1"` block.
3. Make this script executable, e.g.:
```shell ```shell
sudo chmod a+x ./install/myscript chmod +x ./install/myscript
``` ```
3. Test your script 4. Test your script standalone:
4. Run `make self` to generate new `./Makefile` ```shell
./install/myscript install
./install/myscript upgrade
./install/myscript remove
```
5. Run `make self` to regenerate `./Makefile`
## How to create a pack? ## How to create a pack?
@@ -66,11 +54,11 @@ Syntax is same as classic makefile.
It is important to add a comment with short description: It is important to add a comment with short description:
```makefile ```makefile
# Pack description ##mypack1: Pack description
mypack1: goal1 goal2 goalX ... mypack1: goal1 goal2 goalX ...
... ...
# Pack description ##mypackX: Pack description
mypackX: goalA goalB mypackX: goalA goalB
@cp file1 file2 @cp file1 file2
... ...
@@ -78,17 +66,35 @@ mypackX: goalA goalB
``` ```
where: where:
* `mypack*` is the pack name * `mypack*` is the pack name of your choice
* `goal*` are script names in `./install` * `goal*` are script names in `./install`
## TODO ## Useful links and sources used
* build: [flameshot](https://github.com/flameshot-org/flameshot#compilation) * https://gist.github.com/anthonyaxenov/d53c4385b7d1466e0affeb56388b1005
* build: [rustdesk](https://github.com/rustdesk/rustdesk#build) * https://gist.github.com/anthonyaxenov/89c99e09ddb195985707e2b24a57257d
* [JB mono](https://www.jetbrains.com/ru-ru/lp/mono/#how-to-install) ([2](https://fonts.google.com/specimen/JetBrains+Mono)) * ...and other my [gists](https://gist.github.com/anthonyaxenov/) with [SHELL] prefix
* update scripts (when possible) * https://github.com/nvie/gitflow/blob/develop/gitflow-common (BSD License)
* uninstall scripts (when possible) * https://github.com/petervanderdoes/gitflow-avh/blob/develop/gitflow-common (FreeBSD License)
* https://github.com/vaniacer/bash_color/blob/master/color
* https://misc.flogisoft.com/bash/tip_colors_and_formatting
* https://www-users.york.ac.uk/~mijp1/teaching/2nd_year_Comp_Lab/guides/grep_awk_sed.pdf
* https://www.galago-project.org/specs/notification/
* https://laurvas.ru/bash-trap/
* https://stackoverflow.com/a/52674277
* https://rtfm.co.ua/bash-funkciya-getopts-ispolzuem-opcii-v-skriptax/
* https://gist.github.com/jacknlliu/7c51e0ee8b51881dc8fb2183c481992e
* https://gist.github.com/anthonyaxenov/d53c4385b7d1466e0affeb56388b1005
* https://github.com/nvie/gitflow/blob/develop/gitflow-common
* https://github.com/petervanderdoes/gitflow-avh/blob/develop/gitflow-common
* https://gitlab.com/kyb/autorsync/-/blob/master/
* https://lug.fh-swf.de/vim/vim-bash/StyleGuideShell.en.pdf
* https://www.thegeekstuff.com/2010/06/bash-array-tutorial/
* https://www.distributednetworks.com/linux-network-admin/module4/ephemeral-reserved-portNumbers.php
* https://github.com/community-scripts/ProxmoxVE/tree/main/install
* https://github.com/community-scripts/ProxmoxVE/tree/main/misc
* https://faculty.cs.niu.edu/~hutchins/csci480/signals.htm
## License ## License
[WTFPLv2](LICENSE) [WTFPLv2](LICENSE) but other licences are also possible.
+11
View File
@@ -0,0 +1,11 @@
# Todo list
* tdesktop (https://desktop.telegram.org)
* spoofdpi (https://git.axenov.dev/mirrors/SpoofDPI/tags)
* lazynvim (https://www.lazyvim.org)
* build: [flameshot](https://github.com/flameshot-org/flameshot#compilation)
* build: [rustdesk](https://github.com/rustdesk/rustdesk#build)
* update scripts (when possible)
* uninstall scripts (when possible)
* ...
-158
View File
@@ -1,158 +0,0 @@
#!/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 sudoed
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
View File
@@ -1,108 +0,0 @@
# ~/.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
View File
@@ -1,15 +0,0 @@
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
-170
View File
@@ -1,170 +0,0 @@
[alias]
# shortcuts -----------------------------------------------------------------
a = "add"
aa = "add --all" # add all unstaged into index
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
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/
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
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"
d = "diff"
dc = "diff --cached" # show diff of staged files
dw = "diff --word-diff" # show word diff in unstaged files
dwc = "diff --word-diff --cached" # dc + dw
f = "fetch"
fa = "fetch --all" # fetch branches from all remotes
l = "log"
lo = "log --oneline"
m = "merge"
ma = "merge --abort" # abort merging
mc = "merge --continue" # continue merging
mn = "merge --no-commit" # merge without commit
p = "pull"
# pr = "!git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1" # github: встать на PR с указанным id
prs = "pull --recurse-submodules" # pull with submodules
r = "remote"
ra = "remote add"
rb = "rebase"
rba = "rebase --abort"
rbc = "rebase --continue"
rbi = "rebase --interactive"
rbs = "rebase --skip"
rp = "remote prune"
rpd = "remote prune --dry-run"
rpo = "remote prune origin"
rpod = "remote prune origin --dry-run"
rs = "remote show"
rso = "remote show origin"
ru = "remote update"
rv = "remote -v"
rv = "revert"
rvn = "revert --no-commit"
s = "status"
sb = "show-branch"
sub = "submodule"
# sa = "submodule add"
# sdi = "submodule deinit -f"
# si = "submodule init"
# ss = "submodule summary"
# sst = "submodule status"
# sup = "submodule update"
# subcommands -----------------------------------------------------------------
# gwhoami = "guser"
# whoami = "user"
# ploh = "pull origin HEAD" # получить текущую ветку из origin
# sy = "remote update origin --prune"
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
archive = !"f() { top=$(rev-parse --show-toplevel); cd $top; tar cvzf $top.tar.gz $top ; }; f" # make repo .tar.gz
branches = "branch -a"
branches = "bvv"
cleaner = "clean -dff"
cleanest = "clean -dffx"
cleanout = "!git clean -df && git checkout -- ."
clear = "checkout --" # удаляет изменения в файле
contributors = "shortlog --summary --numbered --no-merges" # users participating in development
current-branch = "branch --show-current" #rev-parse --abbrev-ref HEAD
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 --"
exec = "!exec"
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
; last-tag = "describe --tags --abbrev=0"
; last-tagged = "!git describe --tags $(git rev-list --tags --max-count=1)"
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
merged = "bm"
optimizer = "!git pruner; git repacker; git prune-packed"
orphans = "fsck --full"
pruner = "!git prune --expire=now; git reflog expire --expire-unreachable=now --rewrite --all"
publish = "!git push --set-upstream origin $(git current-branch)"
pullf = "pull --force" # получить ветку принудительно
pullft = "pull --tags --force" # получить теги
pullt = "pull --tags" # получить теги
pushf = "push --force" # отправить ветку принудительно
pushft = "push --tags --force" # отправить теги принудительно
pusht = "push --tags" # отправить теги
remotes = "remote -v" # показать список удалённых репозиториев
repacker = "repack -a -d -f --depth=300 --window=300 --window-memory=1g"
repush = "git push origin :$1 && git push origin $1'" # замена push --force
rh = "reset --hard" # откат коммита с удалением всех изменений на указанный коммит
rhh = "reset --hard HEAD" # откат коммита с удалением всех изменений на последний коммит
rmh = "reset --mixed HEAD" # откат коммита с сохранением всех изменений
rpo = "remote prune origin" # удалить все мёртвые ссылки на bare-ветки origin
rso = "remote show origin" # показать состояние локальных веток относительно удалённых на origin bare
stashes = "stash list" # show stashed changes
tags = "tag -n1 --list" # shot tag names and commit message
# remove branches merged into specified or default one and clear dead links to remote branches
trim = "!DEFAULT=$(git default-branch); git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; git remote prune origin;"
uncommit = "reset --soft 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 = "commit -am 'WIP'"
wipa = "commit --amend -am 'WIP'"
head = "log -1 HEAD" # показать последний коммит в текущей ветке
heads = "log --graph --decorate --simplify-by-decoration --oneline" # show last commit of each branch as tree graph
log-all = "log --graph --decorate --all"
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'"
log-my = "!git log --author $(git config user.email)"
inbound = "!git remote update --prune; git log ..@{upstream}" # get
outbound = "log @{upstream}.."
chart = "!f() { \
git log \
--format=oneline \
--format=\"%aE %at\" \
--since=6-weeks-ago \
$* | \
awk ' \
function time_to_slot(t) { return strftime(\"%Y-%m-%d\", t, true) } \
function count_to_char(i) { return (i > 0) ? ((i < 10) ? i : \"X\") : \".\" } \
BEGIN { \
time_min = systime(); time_max = 0; \
SECONDS_PER_DAY=86400; \
} \
{ \
item = $1; \
time = 0 + $2; \
if (time > time_max){ time_max = time } else if (time < time_min){ time_min = time }; \
slot = time_to_slot(time); \
items[item]++; \
slots[slot]++; \
views[item, slot]++; \
} \
END{ \
printf(\"Chart time range %s to %s.\\n\", time_to_slot(time_min), time_to_slot(time_max)); \
time_max_add = time_max += SECONDS_PER_DAY; \
for(item in items){ \
row = \"\"; \
for(time = time_min; time < time_max_add; time += SECONDS_PER_DAY) { \
slot = time_to_slot(time); \
count = views[item, slot]; \
row = row count_to_char(count); \
} \
print row, item; \
} \
}'; \
}; f"
-28
View File
@@ -1,28 +0,0 @@
[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
View File
@@ -1,4 +0,0 @@
.DS_Store
Desktop.ini
._*
Thumbs.db
View File
-112
View File
@@ -1,112 +0,0 @@
# 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
-2
View File
@@ -1,2 +0,0 @@
This directory contains files whose names start with a dot.
Make sure your file manager displays them here.
+41 -33
View File
@@ -1,12 +1,28 @@
#!/bin/bash #!/usr/bin/env bash
mv Makefile Makefile.bak set -eo pipefail
[ -f Makefile ] && mv Makefile Makefile.bak
CHR_UPGRADE='^' CHR_UPGRADE='^'
CHR_UNINSTALL='/' CHR_UNINSTALL='/'
cat << EOF >> Makefile cat << EOF > Makefile
# Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]} # Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]}
.DEFAULT_GOAL := help .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} install\n" >> Makefile
done;
cat << EOF >> Makefile
#=============================================== #===============================================
# Scripts listed in ./packs # Scripts listed in ./packs
#=============================================== #===============================================
@@ -20,7 +36,7 @@ done;
cat << EOF >> Makefile cat << EOF >> Makefile
#=============================================== #===============================================
# Scripts listed in ./install # Upgrade targets (use install script with 'upgrade' arg)
#=============================================== #===============================================
EOF EOF
@@ -28,39 +44,30 @@ EOF
for file in ./install/*; do for file in ./install/*; do
name=${file##*/} name=${file##*/}
name=${name%.sh} name=${name%.sh}
[ "$name" = "_example" ] && continue
has_upgrade=$(grep -q '^upgrade() {' ${file} && echo yes || echo no)
[ "$has_upgrade" = "no" ] && continue
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file}) desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
[ -z "$desc" ] && desc='<no description>' [ -z "$desc" ] && desc='<no description>'
echo -e "# ${desc}\n${name}:\n\t@${file}\n" >> Makefile echo -e "##${CHR_UPGRADE}${name}: ${desc}\n${CHR_UPGRADE}${name}:\n\t@${file} upgrade\n" >> Makefile
done; done;
cat << EOF >> Makefile cat << EOF >> Makefile
#=============================================== #===============================================
# Scripts listed in ./upgrade # Remove targets (use install script with 'remove' arg)
#=============================================== #===============================================
EOF EOF
for file in ./upgrade/*; do for file in ./install/*; do
name=${file##*/} name=${file##*/}
name=${name%.sh} name=${name%.sh}
[ "$name" = "_example" ] && continue
has_remove=$(grep -q '^remove() {' ${file} && echo yes || echo no)
[ "$has_remove" = "no" ] && continue
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file}) desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
[ -z "$desc" ] && desc='<no description>' [ -z "$desc" ] && desc='<no description>'
echo -e "# ${desc}\n${CHR_UPGRADE}${name}:\n\t@${file}\n" >> Makefile echo -e "##${CHR_UNINSTALL}${name}: ${desc}\n${CHR_UNINSTALL}${name}:\n\t@${file} remove\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 "# ${desc}\n${CHR_UNINSTALL}${name}:\n\t@${file}\n" >> Makefile
done; done;
cat << EOF >> Makefile cat << EOF >> Makefile
@@ -70,21 +77,22 @@ cat << EOF >> Makefile
self: self:
@./gen-makefile @./gen-makefile
help: Makefile help: Makefile
@echo "Ubuntu software installator" @echo "Ubuntu software installator"
@echo @echo
@echo "Usage:\n \ @echo "Usage:"
make help|- show this help\n \ @echo "\tmake help\t - show this help"
make self|- regenerate Makefile (alias of ./gen-makefile)\n \ @echo "\tmake self\t - regenerate Makefile (alias of ./gen-makefile)"
make GOAL|- install software\n \ @echo "\tmake GOAL\t - install software"
make ${CHR_UPGRADE}GOAL|- upgrade software\n \ @echo "\tmake ${CHR_UPGRADE}GOAL\t - upgrade software"
make ${CHR_UNINSTALL}GOAL|- uninstall software" | column -ts '|' @echo "\tmake ${CHR_UNINSTALL}GOAL\t - uninstall software"
@echo "\nYou can combine GOALs, here are some examples:" @echo "\nYou can combine GOALs, here are some examples:"
@echo "\tmake @docker docker" @echo "\tmake ${CHR_UNINSTALL}docker docker"
@echo "\tmake php @docker ^omz" @echo "\tmake php ${CHR_UNINSTALL}docker ${CHR_UPGRADE}omz"
@echo "\nAvailable GOALs:" @echo "\nAvailable GOALs:"
@sed -n '/^#/{N;s/# *\(.*\)\n\([^# .].*:\)/\t\2\1/p}' $< | column -ts ':' @sed -n 's/^##//p' $< | column -ts ':' | sed -e "s/^/\t/"
+%:
@make $*
EOF EOF
echo "New ./Makefile has been generated!" echo "New ./Makefile has been generated!"
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -oe pipefail
__root__=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
source $__root__/helpers/io.sh || exit 255
source $__root__/helpers/git.sh || exit 255
source $__root__/helpers/basic.sh || exit 255
source $__root__/helpers/debug.sh || exit 255
source $__root__/helpers/packages.sh || exit 255
title() {
[[ $__AAA_NO_TITLE = 1 ]] || {
[ "$1" ] && title="$1" || title="$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${BASH_SOURCE[1]})"
info
info "==============================================="
info "$title"
info "==============================================="
info
}
}
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
##makedesc: Example script
set -eo pipefail
install() {
echo
echo "==============================================="
echo "Installing example"
echo "==============================================="
echo
sleep 3
echo
echo "Finish! example v1.2.3"
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading example"
echo "==============================================="
echo
sleep 3
echo
echo "Finish! example v1.2.3"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing example"
echo "==============================================="
echo
sleep 3
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+46
View File
@@ -0,0 +1,46 @@
#!/usr/bin/env bash
##makedesc: Manage anytype (deb)
set -eo pipefail
installDir="$HOME/install/anytype"
install() {
release="$(curl -s 'https://api.github.com/repos/anyproto/anytype-ts/releases/latest')"
tag="$(echo "$release" | jq -r '.tag_name')"
asset="$(echo "$release" | jq -r '.assets.[] | select(.name | test("amd64.deb$"))')"
url="$(echo "$asset" | jq -r '.browser_download_url')"
echo -e "$tag $url"
echo
echo "==============================================="
echo "Installing anytype $tag"
echo "==============================================="
echo
mkdir -p "$installDir"
filepath="$installDir/anytype_${tag}_amd46.deb"
wget "$url" -O "$filepath"
sudo dpkg -i "$filepath"
echo
echo "Finish! $tag"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing anytype"
echo "==============================================="
echo
sudo apt purge -y anytype*
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
##makedesc: Install apache2 (latest)
echo
echo "==============================================="
echo "Installing apache2..."
echo "==============================================="
echo
sudo apt install -y --autoremove apache2 && \
sudo systemctl restart apache2 && \
apache2 -v
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
##makedesc: Manage apache2 (apt)
set -eo pipefail
install() {
echo
echo "==============================================="
echo "Installing apache2"
echo "==============================================="
echo
sudo apt install -y apache2
sudo systemctl restart apache2
echo
echo "Finish! $(apache2 -v)"
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading apache2"
echo "==============================================="
echo
sudo apt upgrade -y apache2 apache2-data apache2-utils
sudo systemctl restart apache2
echo
echo "Finish! $(apache2 -v)"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing apache2"
echo "==============================================="
echo
sudo apt purge -y apache2*
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+35 -18
View File
@@ -1,15 +1,22 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install bunch of software from apt ##makedesc: Install basic software from apt
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: This script is for Debian/Ubuntu only. Use 'make brew' on macOS." >&2
exit 1
fi
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing software from apt..." echo "Installing basic software from apt"
echo "===============================================" echo "==============================================="
echo echo
sudo apt update && \ sudo apt update
sudo apt upgrade -y --autoremove sudo apt upgrade -y --autoremove
sudo apt install -y \ sudo apt install -y \
alien \ alien \
apt-transport-https \ apt-transport-https \
@@ -31,7 +38,6 @@ sudo apt install -y \
libghc-zlib-dev \ libghc-zlib-dev \
libssl-dev \ libssl-dev \
lsb-release \ lsb-release \
lsp-plugins \
make \ make \
mc \ mc \
meld \ meld \
@@ -40,22 +46,33 @@ sudo apt install -y \
net-tools \ net-tools \
nmap \ nmap \
p7zip-full \ p7zip-full \
pulseeffects \ easyeffects \
software-properties-common \ software-properties-common \
sqlitebrowser \
terminator \
ubuntu-restricted-extras \ ubuntu-restricted-extras \
unzip \ unzip \
vlc \ vlc \
ffmpeg \ ffmpeg \
xclip \
inotify-tools \ inotify-tools \
notify-osd \ notify-osd \
libnotify-bin fonts-open-sans \
# earlyoom \ libnotify-bin \
# etckeeper \ tree \
# geoclue-2.0 \ earlyoom
# gnome-software \ # terminator
# minder \ # xclip
# redshift \ # sqlitebrowser
# redshift-gtk # etckeeper
echo
echo "Finish!"
echo
}
upgrade() {
install
}
case "$1" in
u|upgrade|update) upgrade ;;
*) install ;;
esac
Executable
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
##makedesc: Install software from brew
set -eo pipefail
if [ "$(uname -s)" != "Darwin" ]; then
echo "ERROR: This script is for MacOS only." >&2
exit 1
fi
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing software from brew"
echo "==============================================="
echo
if ! installed brew; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
fi
brew install \
bash \
stow \
gnupg \
pinentry-mac
mkdir -p ~/.gnupg
echo "pinentry-program $(which pinentry-mac)" >> ~/.gnupg/gpg-agent.conf
gpgconf --kill gpg-agent
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+52 -4
View File
@@ -1,11 +1,59 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install Canon Pixma MG2500 + ppa ##makedesc: Canon Pixma MG2500 + ppa
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: Canon Pixma MG2500 drivers are not supported on macOS." >&2
exit 1
fi
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing Canon Pixma MG2500 + ppa..." echo "Installing Canon Pixma MG2500 + ppa"
echo "===============================================" echo "==============================================="
echo echo
sudo add-apt-repository -y ppa:thierry-f/fork-michael-gruz sudo add-apt-repository -y ppa:thierry-f/fork-michael-gruz
sudo apt install -y cnijfilter-mg2500series scangearmp-mg2500series sudo apt install -y cnijfilter-mg2500series scangearmp-mg2500series
echo
echo "Finish!"
echo "Drivers for Canon Pixma MG2500 installed!"
echo "Now you must reboot PC and connect your printer."
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading Canon Pixma MG2500 + ppa"
echo "==============================================="
echo
sudo apt upgrade -y cnijfilter-mg2500series scangearmp-mg2500series
echo
echo "Finish!"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing Canon Pixma MG2500 + ppa"
echo "==============================================="
echo
# sudo apt purge -y cnijfilter-mg2500series scangearmp-mg2500series
sudo dpkg -r cnijfilter-mg2500series
sudo dpkg -r cnijfilter-common
sudo dpkg -r scangearmp-mg2500series
sudo dpkg -r scangearmp-common
sudo add-apt-repository -ry ppa:thierry-f/fork-michael-gruz
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+94 -10
View File
@@ -1,14 +1,98 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install google chrome (latest) ##makedesc: Google Chrome (latest)
echo set -eo pipefail
echo "==============================================="
echo "Installing google chrome (latest)..." installed() { command -v "$1" >/dev/null 2>&1; }
echo "==============================================="
echo
# https://t.me/axenov_blog/251 # https://t.me/axenov_blog/251
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -O /tmp/google-chrome-stable_current_amd64.deb && \ dest="$HOME/install/deb"
sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb && \ deb="$dest/google-chrome.deb"
rm /tmp/google-chrome-stable_current_amd64.deb url="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask google-chrome
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing Google Chrome"
echo "==============================================="
echo
mkdir -p "$dest"
if installed wget; then
wget -q --show-progress "$url" -O "$deb"
else
curl -fsSL "$url" -o "$deb"
fi
sudo dpkg -i "$deb"
echo
echo "Finish!"
google-chrome --version
echo
}
upgrade() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew upgrade --cask google-chrome
fi
return
fi
echo
echo "==============================================="
echo "Upgrading Google Chrome"
echo "==============================================="
echo
mkdir -p "$dest"
if installed wget; then
wget -q --show-progress "$url" -O "$deb"
else
curl -fsSL "$url" -o "$deb"
fi
sudo dpkg -i "$deb"
echo
echo "Finish!"
google-chrome --version
echo
}
remove() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew uninstall --cask google-chrome
fi
return
fi
echo
echo "==============================================="
echo "Removing Google Chrome"
echo "==============================================="
echo
sudo dpkg -r google-chrome-stable
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
Executable
+61
View File
@@ -0,0 +1,61 @@
#!/usr/bin/env bash
##makedesc: ClamAV
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: clamav are not supported on macOS." >&2
exit 1
fi
install() {
echo
echo "==============================================="
echo "Installing clamav"
echo "==============================================="
echo
sudo apt install -y clamav
echo "DatabaseMirror packages.microsoft.com/clamav" \
| sudo tee -a /etc/clamav/freshclam.conf
sudo freshclam
echo
echo "Finish!"
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading clamav"
echo "==============================================="
echo
sudo apt upgrade -y clamav
sudo freshclam
echo
echo "Finish!"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing clamav"
echo "==============================================="
echo
sudo apt purge -y clamav*
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+107
View File
@@ -0,0 +1,107 @@
#!/usr/bin/env bash
##makedesc: Install composer (latest)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
warn() { echo "WARNING: $*" >&2; }
require() {
local missing=()
for pkg in "$@"; do
installed "$pkg" || missing+=("$pkg")
done
if [ ${#missing[@]} -gt 0 ]; then
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install "${missing[@]}"
else
echo "ERROR: Missing: ${missing[*]}. Install manually or use brew." >&2
exit 1
fi
else
sudo apt install -y "${missing[@]}"
fi
fi
}
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
install() {
echo
echo "==============================================="
echo "Installing composer"
echo "==============================================="
echo
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
require php
if installed composer; then
warn "Removing current composer to install latest one"
composer --version
rm -f "$HOME/.local/bin/composer" /usr/local/bin/composer /usr/bin/composer 2>/dev/null || true
fi
mkdir -p "$HOME/install/other" "$HOME/.local/bin"
download "https://getcomposer.org/installer" \
"$HOME/install/other/composer-setup.php"
php "$HOME/install/other/composer-setup.php" \
--install-dir="$HOME/.local/bin/" \
--filename="composer"
COMPOSER_GLOBAL_HOME="$($HOME/.local/bin/composer config -g home)"
NEWPATH="PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
if ! grep -qoh "$NEWPATH" "$HOME/.profile" 2>/dev/null; then
export "$NEWPATH"
echo "export $NEWPATH" >> "$HOME/.profile"
fi
# shellcheck source=/dev/null
source "$HOME/.profile"
echo
echo "Finish!"
composer --version
echo
}
upgrade() {
install
}
remove() {
echo
echo "==============================================="
echo "Removing composer"
echo "==============================================="
echo
sudo apt remove -y --autoremove composer 2>/dev/null || true
rm -f \
"$HOME/.local/bin/composer" \
/bin/composer \
/usr/bin/composer \
/usr/local/bin/composer \
/usr/src/composer 2>/dev/null || true
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
-42
View File
@@ -1,42 +0,0 @@
#!/bin/bash
##makedesc: Install composer (latest)
echo
echo "==============================================="
echo "Installing composer (latest)..."
echo "==============================================="
echo
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
installed() {
command -v "$1" >/dev/null 2>&1
}
!installed "php" && echo "WARNING: You need to have php installed"
if installed "composer"; then
echo "WARNING: Removing current composer to install its actual version"
sudo apt remove -y --autoremove composer
sudo rm /bin/composer
sudo rm /usr/bin/composer
sudo rm /usr/local/bin/composer
sudo rm /usr/src/composer
rm $HOME/.local/bin/composer
fi
mkdir -p $HOME/install && cd $HOME/install
# mkdir -p $HOME/.local/bin
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
wget https://getcomposer.org/installer -O 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
cp $HOME/install/composer.phar $HOME/.local/bin/composer
cd - >/dev/null
installed "composer" && composer --version
+83 -23
View File
@@ -1,37 +1,97 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install docker (latest) + docker-compose (latest) + ppa ##makedesc: Docker + ppa
echo
echo "==============================================="
echo "Installing docker (latest)..."
echo "==============================================="
echo
# https://docs.docker.com/engine/install/ubuntu/ # https://docs.docker.com/engine/install/ubuntu/
# https://docs.docker.com/engine/install/linux-postinstall/#manage-docker-as-a-non-root-user
sudo apt install \ set -eo pipefail
ca-certificates \
curl \
gnupg \
lsb-release
sudo mkdir -p /etc/apt/keyrings doRemove() {
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo apt purge -y docker* podman-docker containerd runc
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \ }
installRepo() {
sudo apt install -y ca-certificates lsb-release
source /etc/os-release
key="/etc/apt/keyrings/docker.asc"
arch=$(dpkg --print-architecture)
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" -o "$key"
sudo chmod a+r $key
echo "deb [arch=$arch signed-by=$key] https://download.docker.com/linux/ubuntu $VERSION_CODENAME stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo chmod a+r /etc/apt/keyrings/docker.gpg
sudo apt update sudo apt update
sudo apt install -y --autoremove \ }
doInstall() {
echo
echo "==============================================="
echo "Installing Docker"
echo "==============================================="
echo
# doRemove
installRepo
sudo apt install -y \
docker-ce \ docker-ce \
docker-ce-cli \ docker-ce-cli \
containerd.io \ containerd.io \
docker-buildx-plugin \
docker-compose-plugin
sudo usermod -aG docker "$(whoami)"
newgrp docker
echo
echo "Finish! $(docker --version)"
echo "Probably, you need to relogin to apply 'docker' group permanently."
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading Docker"
echo "==============================================="
echo
sudo apt upgrade -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin \ docker-compose-plugin \
docker-compose docker-model-plugin
sudo usermod -aG docker anthony echo
echo "Finish!"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing Docker"
echo "==============================================="
echo
sudo apt remove -y --autoremove \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin \
docker-ce-rootless-extras
sudo rm -rf \
/var/lib/docker \
/var/lib/containerd \
/etc/apt/sources.list.d/docker.list \
/etc/apt/keyrings/docker.asc
echo echo
echo "Finish!" echo "Finish!"
echo "Probably, you need to relogin to apply 'docker' group."
echo "Your ones currently are: $(groups)"
echo echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
install-repo) installRepo ;;
# remove-repo) removeRepo ;; #TODO
*) doInstall ;;
esac
-26
View File
@@ -1,26 +0,0 @@
#!/bin/bash
##makedesc: Install dotfiles
echo
echo "==============================================="
echo "Installing dotfiles..."
echo "==============================================="
echo
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() {
echo "mv "$HOME/$1" "$HOME/$1$postfix""
echo "cp "$dotfiles_src_dir/$1" "$HOME/$1""
echo "- $1"
}
install .bash_aliases
install .profile
install .bashrc
install .gitconfig
install .gitignore
install .git_aliases
ln -s "$HOME/.profile" "$HOME/.zprofile"
+30 -10
View File
@@ -1,20 +1,40 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install droidcam v1.8.2 ##makedesc: Install droidcam v1.9.0
# https://www.dev47apps.com/droidcam/linux/ set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: droidcam is not supported on macOS." >&2
exit 1
fi
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing droidcam v1.8.2..." echo "Installing droidcam"
echo "===============================================" echo "==============================================="
echo echo
mkdir -p ~/install/droidcam # https://droidcam.app/linux/
wget -O /tmp/droidcam.zip https://files.dev47apps.net/linux/droidcam_1.8.2.zip
unzip -o /tmp/droidcam.zip -d ~/install/droidcam mkdir -p "$HOME/install/deb/"
rm -rf /tmp/droidcam.zip
cd ~/install/droidcam && sudo ./install-client if command -v wget >/dev/null 2>&1; then
wget -q --show-progress "https://beta.droidcam.app/go/droidCam.client.setup.deb" -O "$HOME/install/deb/droidcam_client_amd64.deb"
else
curl -fsSL "https://beta.droidcam.app/go/droidCam.client.setup.deb" -o "$HOME/install/deb/droidcam_client_amd64.deb"
fi
sudo dpkg -i "$HOME/install/deb/droidcam_client_amd64.deb"
sudo apt install -y v4l2loopback-dkms
echo echo
echo "Don't forget to install android app: https://play.google.com/store/apps/developer?id=Dev47Apps" echo "Finish!"
echo "Don't forget to install the android app:"
echo "https://play.google.com/store/apps/developer?id=Dev47Apps"
echo echo
}
case "$1" in
*) install ;;
esac
+32 -14
View File
@@ -1,31 +1,49 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install droidcam-obs plugin v1.5.1 ##makedesc: Install droidcam-obs plugin v1.5.1
set -eo pipefail
#TODO
# ffmpeg -version | head -n 1 | awk '{print $3}'
# https://github.com/dev47apps/droidcam-obs-plugin/releases
installed() { command -v "$1" >/dev/null 2>&1; }
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: droidcam-obs plugin is not supported on macOS." >&2
exit 1
fi
install() {
echo
echo "==============================================="
echo "Installing droidcam-obs"
echo "==============================================="
echo
# 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://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
echo command -v "obs-studio" >/dev/null 2>&1 || echo "WARNING: You need obs-studio first!"
echo "==============================================="
echo "Installing droidcam-obs..."
echo "==============================================="
echo
# command -v "obs" >/dev/null 2>&1 || echo 'You need to install obs first!' mkdir -p "$HOME/install/droidcam-obs"
command -v "obs-studio" >/dev/null 2>&1 || echo 'You need to install obs-studio first!'
mkdir -p ~/install/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 "$HOME/install/droidcam-obs"
rm -rf /tmp/droidcam-obs.zip rm -rf /tmp/droidcam-obs.zip
cd ~/install/droidcam-obs && ./install.sh cd "$HOME/install/droidcam-obs"
./install.sh
sudo modprobe v4l2loopback video_nr=2 card_label="OBS Virtual Camera" 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 OR install (if not) and start it" 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 "3) if virtual camera not starting then execute:"
echo -e "\tsudo modprobe v4l2loopback video_nr=2 card_label=\"OBS Virtual Camera\"" echo -e "\tsudo modprobe v4l2loopback video_nr=2 card_label=\"OBS Virtual Camera\""
echo echo
}
case "$1" in
*) install ;;
esac
+71
View File
@@ -0,0 +1,71 @@
#!/usr/bin/env bash
##makedesc: Install flameshot (latest)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask flameshot
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing flameshot"
echo "==============================================="
echo
# https://github.com/flameshot-org/flameshot?tab=readme-ov-file#compilation
# sudo apt install -y --autoremove flameshot
# sudo systemctl restart flameshot
dir="$HOME/install"
clone_dir="$dir/flameshot"
mkdir -p "$dir"
sudo apt install -y \
g++ \
cmake \
build-essential \
qtbase5-dev \
qttools5-dev-tools \
libqt5svg5-dev \
qttools5-dev \
libqt5dbus5 \
libqt5network5 \
libqt5core5a \
libqt5widgets5 \
libqt5gui5 \
libqt5svg5
if [ ! -d "$clone_dir" ]; then
git clone --depth=1 --single-branch https://github.com/flameshot-org/flameshot.git "$clone_dir"
fi
# Directory where build files will be placed, may be relative
export BUILD_DIR=build
# Directory prefix where flameshot will be installed.
export CMAKE_INSTALL_PREFIX=/opt/flameshot
cd "$clone_dir"
git pull
cmake -S . -B "$BUILD_DIR"
cmake --build "$BUILD_DIR"
echo
echo "Finish!"
# /opt/flameshot/flameshot -v
echo
}
case "$1" in
*) install ;;
esac
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash
##makedesc: [TODO] Build flameshot from src (latest)
echo
echo "==============================================="
echo "Installing flameshot (latest)..."
echo "==============================================="
echo
+65 -25
View File
@@ -1,40 +1,80 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install git (latest) ##makedesc: Install git (latest)
echo set -eo pipefail
echo "==============================================="
echo "Installing git (latest)..."
echo "==============================================="
echo
installed() { installed() { command -v "$1" >/dev/null 2>&1; }
command -v "$1" >/dev/null 2>&1
require() {
local missing=()
for pkg in "$@"; do
installed "$pkg" || missing+=("$pkg")
done
if [ ${#missing[@]} -gt 0 ]; then
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install "${missing[@]}"
else
echo "ERROR: Missing: ${missing[*]}. Install manually or use brew." >&2
exit 1
fi
else
sudo apt install -y "${missing[@]}"
fi
fi
} }
! installed make && sudo apt install -y make download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
clone_quick() {
git clone --depth=1 --single-branch "$@"
}
install() {
echo
echo "==============================================="
echo "Installing git"
echo "==============================================="
echo
require make
if installed git; then if installed git; then
if [ -d "${HOME}/install/git" ]; then if [ -d "$HOME/install/git" ]; then
cd "${HOME}/install/git" && \ cd "$HOME/install/git"
git pull git pull
else else
git clone https://github.com/git/git.git --depth=1 "${HOME}/install/git" && \ clone_quick "https://github.com/git/git.git" "$HOME/install/git"
cd "${HOME}/install/git" cd "$HOME/install/git"
fi fi
sudo make prefix=/usr/local all && \ 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 unzip
[ -d "${HOME}/install/git" ] || mkdir -p "${HOME}/install/git" mkdir -p "$HOME/install/git"
wget https://github.com/git/git/archive/master.zip -O /tmp/git.zip && \ download "https://github.com/git/git/archive/master.zip" "/tmp/git.zip"
unzip -q /tmp/git.zip -d "${HOME}/install/git" && \ unzip -oq "/tmp/git.zip" -d "$HOME/install/git"
rm /tmp/git.zip && \ rm /tmp/git.zip
cd "${HOME}/install/git/git-master" && \ cd "$HOME/install/git/git-master"
sudo make prefix=/usr/local all && \ sudo make prefix=/usr/local all
sudo make prefix=/usr/local install && \ sudo make prefix=/usr/local install
cd - && \ cd -
rm -rf git && \ rm -rf git
git clone https://github.com/git/git.git --depth=1 "${HOME}/install/git" clone_quick "https://github.com/git/git.git" "$HOME/install/git"
fi fi
echo
echo "Finish!"
git --version git --version
echo
}
case "$1" in
*) install ;;
esac
+71 -16
View File
@@ -1,27 +1,82 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install golang v1.18.3 ##makedesc: Install golang
# 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://github.com/udhos/update-golang/blob/master/update-golang.sh
set -eo pipefail
[ $1 ] && VERSION="$1" || VERSION="1.18.3" installed() { command -v "$1" >/dev/null 2>&1; }
FILE="go$VERSION.linux-amd64.tar.gz"
doRemove() {
[ -d "/usr/local/go" ] && sudo rm -rf "/usr/local/go"
}
install() {
dlUrl="https://go.dev/dl"
json=$(curl -sSL "$dlUrl/?mode=json")
version=$(echo "$json" | jq -r '.[0].version')
echo echo
echo "===============================================" echo "==============================================="
echo "Installing golang v$VERSION..." echo "Installing golang v$version"
echo "===============================================" echo "==============================================="
echo echo
sudo rm -rf /usr/local/go && \ local os="linux"
wget "https://golang.org/dl/$FILE" -O /tmp/$FILE && \ [ "$(uname -s)" = "Darwin" ] && os="darwin"
sudo tar -xzf /tmp/$FILE -C /usr/local && \
rm -rf /tmp/$FILE && \ latestJson=$(echo "$json" | jq -r ".[0].files.[] | select (.kind == \"archive\" and .os == \"$os\" and .arch == \"amd64\")")
sudo chown $USER: -R /usr/local/go && \ fileName=$(echo "$latestJson" | jq -r '.filename')
echo 'export PATH="$PATH:/usr/local/go/bin\"' >> $HOME/.profile && \ fileUrl="$dlUrl/$fileName"
echo 'export GOPATH="$HOME/.go"' >> $HOME/.profile && \ downloadPath="$HOME/install"
# source ~/.profile && \ archivePath="$downloadPath/$fileName"
go version && \ doRemove
echo "NOTE: now run 'source ~/.profile' to apply new env vars" if [ ! -f "$archivePath" ]; then
if installed wget; then
wget -q --show-progress "$fileUrl" -O "$archivePath"
else
curl -fsSL "$fileUrl" -o "$archivePath"
fi
fi
sudo tar -xzf "$archivePath" -C /usr/local
sudo chown "$USER": -R /usr/local/go
if ! grep -q '/usr/local/go/bin' "$HOME/.profile" 2>/dev/null; then
echo 'export PATH="/usr/local/go/bin:$PATH"' >> "$HOME/.profile"
echo "export GOPATH=\"\$HOME/.go\"" >> "$HOME/.profile"
fi
# shellcheck source=/dev/null
source "$HOME/.profile"
echo
go version
go install github.com/go-delve/delve/cmd/dlv@latest
echo "Finish!"
echo
}
upgrade() {
install
}
remove() {
echo
echo "==============================================="
echo "Removing golang"
echo "==============================================="
echo
doRemove
sed -i '/\/usr\/local\/go\/bin/d' "$HOME/.profile"
sed -i '/GOPATH/d' "$HOME/.profile"
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
##makedesc: Install grub-customizer (latest + ppa)
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: grub-customizer is not supported on macOS." >&2
exit 1
fi
install() {
echo
echo "==============================================="
echo "Installing grub-customizer"
echo "==============================================="
echo
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer
sudo apt install -y --autoremove grub-customizer
echo
echo "Finish!"
grub-customizer -v
echo
}
remove() {
echo
echo "==============================================="
echo "Removing grub-customizer"
echo "==============================================="
echo
source_file="/etc/apt/sources.list.d/$(ls -1 /etc/apt/sources.list.d/ | grep danielrichter2007)"
sudo apt remove -y --autoremove grub-customizer
if [ -f "$source_file" ]; then
sudo rm "$source_file"
sudo apt update
fi
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
-11
View File
@@ -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 -y ppa:danielrichter2007/grub-customizer
sudo apt install -y --autoremove grub-customizer
+22 -6
View File
@@ -1,9 +1,19 @@
#!/bin/bash (latest) #!/usr/bin/env bash
##makedesc: Install KDE Window AppMenu Applet ##makedesc: Install KDE Window AppMenu Applet
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: KDE Window AppMenu Applet is not supported on macOS." >&2
exit 1
fi
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing KDE Window AppMenu Applet..." echo "Installing KDE Window AppMenu Applet"
echo "===============================================" echo "==============================================="
echo echo
@@ -24,20 +34,26 @@ sudo apt install -y --autoremove \
libkf5wayland-dev \ libkf5wayland-dev \
plasma-workspace-dev plasma-workspace-dev
if installed 'git'; then if installed git; then
sudo rm -rf /usr/src/appmenu-applet sudo rm -rf /usr/src/appmenu-applet
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
sudo rm -f /usr/src/appmenu-applet.zip sudo rm -f /usr/src/appmenu-applet.zip
fi fi
sudo chown -R $USER: /usr/src/appmenu-applet sudo chown -R "$USER": /usr/src/appmenu-applet
cd /usr/src/appmenu-applet/ cd /usr/src/appmenu-applet/
sh ./install.sh sh ./install.sh
echo echo
echo 'Success! Now you can add "Window AppMenu Applet" on desktop or panel' echo "Finish! Now you can add 'Window AppMenu Applet' on desktop or panel"
echo echo
}
case "$1" in
*) install ;;
esac
+20 -5
View File
@@ -1,14 +1,29 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install KDE Backports + ppa ##makedesc: Install KDE Backports
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: KDE Backports are not supported on macOS." >&2
exit 1
fi
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing KDE Backports + ppa..." echo "Installing KDE Backports"
echo "===============================================" echo "==============================================="
echo echo
sudo add-apt-repository -y ppa:kubuntu-ppa/backports sudo add-apt-repository -y ppa:kubuntu-ppa/backports
sudo add-apt-repository -y ppa:kubuntu-ppa/backports-extra
sudo apt update sudo apt update
sudo pkcon update
sudo apt full-upgrade sudo apt full-upgrade
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+15 -6
View File
@@ -1,7 +1,14 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install file templates (KDE) ##makedesc: Install file templates (KDE)
echo set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "WARNING: KDE file templates are not applicable on macOS." >&2
exit 1
fi
install() {
echo "===============================================" echo "==============================================="
echo "Installing file templates (KDE)..." echo "Installing file templates (KDE)..."
echo "===============================================" echo "==============================================="
@@ -48,7 +55,7 @@ EOF
echo "- Shell" #################################################### echo "- Shell" ####################################################
cat <<EOF > "$TPL_SRC/template.sh" cat <<EOF > "$TPL_SRC/template.sh"
#!/bin/bash #!/usr/bin/env bash
EOF EOF
cat << EOF > "$TPL_DIR/sh.desktop" cat << EOF > "$TPL_DIR/sh.desktop"
@@ -97,11 +104,8 @@ echo "- docker-compose" ####################################################
cat <<EOF > "$TPL_SRC/docker-compose.yml" cat <<EOF > "$TPL_SRC/docker-compose.yml"
# https://docs.docker.com/compose/gettingstarted/ # https://docs.docker.com/compose/gettingstarted/
# https://docs.docker.com/compose/compose-file/compose-file-v3/ # https://docs.docker.com/compose/compose-file/compose-file-v3/
version: "3.9"
services: services:
EOF EOF
cat << EOF > "$TPL_DIR/docker-compose.desktop" cat << EOF > "$TPL_DIR/docker-compose.desktop"
@@ -115,4 +119,9 @@ echo
echo "Finish! You can find them here:" echo "Finish! You can find them here:"
echo -e "\t$TPL_DIR" echo -e "\t$TPL_DIR"
echo echo
}
case "$1" in
*) install ;;
esac
+18 -4
View File
@@ -1,19 +1,33 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install KDE portal ##makedesc: Install KDE portal
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: KDE portal is not supported on macOS." >&2
exit 1
fi
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing KDE portal..." echo "Installing KDE portal"
echo "===============================================" echo "==============================================="
echo echo
sudo apt install -y \ sudo apt install -y \
xdg-desktop-portal \ xdg-desktop-portal \
xdg-desktop-portal-kde \ xdg-desktop-portal-kde \
xdg-desktop-portal-gtk && \ xdg-desktop-portal-gtk
echo "GTK_USE_PORTAL=1" | sudo tee -a /etc/environment && \
echo "GTK_USE_PORTAL=1" | sudo tee -a /etc/environment
echo "XDG_CURRENT_DESKTOP=KDE" | sudo tee -a /etc/environment echo "XDG_CURRENT_DESKTOP=KDE" | sudo tee -a /etc/environment
echo echo
echo "Finish! Now you need to relogin" echo "Finish! Now you need to relogin"
echo echo
}
case "$1" in
*) install ;;
esac
Executable
+84
View File
@@ -0,0 +1,84 @@
#!/usr/bin/env bash
##makedesc: Install keyd
# https://github.com/rvaiya/keyd
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: keyd is not supported on macOS." >&2
exit 1
fi
installed() { command -v "$1" >/dev/null 2>&1; }
mkdir -p "$HOME/install"
install() {
echo
echo "==============================================="
echo "Installing keyd (latest)"
echo "==============================================="
echo
installed git || { echo "ERROR: git not installed" ; exit 1; }
cd "$HOME/install"
git clone --depth=1 --single-branch https://github.com/rvaiya/keyd.git "$HOME/install/keyd"
cd "$HOME/install/keyd"
make
sudo make install
sudo systemctl enable --now keyd
echo
echo "Finish!"
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading keyd"
echo "==============================================="
echo
installed git || { echo "ERROR: git not installed" ; exit 1; }
[ -d "$HOME/install/keyd" ] || { echo "ERROR: repo not found: $HOME/install/keyd" ; exit 1; }
cd "$HOME/install/keyd"
make
sudo make install
sudo systemctl enable --now keyd
sudo usermod -aG keyd "$(whoami)"
echo
echo "Finish!"
echo
}
restart() {
sudo systemctl restart keyd
}
reload() {
sudo systemctl reload keyd
}
remove() {
echo
echo "==============================================="
echo "Removing keyd"
echo "==============================================="
echo
sudo dpkg -r keyd
echo
echo "Finish!"
echo
}
case "$1" in
restart) restart ;;
reload) reload ;;
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+20 -3
View File
@@ -1,11 +1,28 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install libreoffice ##makedesc: Install libreoffice
set -eo pipefail
install() {
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: This script is for Debian/Ubuntu only. Install LibreOffice manually on macOS." >&2
exit 1
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing libreoffice..." echo "Installing libreoffice"
echo "===============================================" echo "==============================================="
echo echo
sudo apt update && \ sudo apt update
sudo apt install -y --autoremove libreoffice sudo apt install -y --autoremove libreoffice
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+88 -75
View File
@@ -1,43 +1,60 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install lite-xl ##makedesc: Install lite-xl v2.1.7
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: lite-xl portable install is not supported on macOS. Use brew install --cask lite-xl or build from source." >&2
exit 1
fi
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing lite-xl v2.1.7"
echo "==============================================="
echo
# https://github.com/lite-xl/lite-xl/releases # https://github.com/lite-xl/lite-xl/releases
# https://lite-xl.com/en/documentation/build # https://lite-xl.com/setup/getting-started/
echo tar_url="https://github.com/lite-xl/lite-xl/releases/download/v2.1.7/lite-xl-v2.1.7-addons-linux-x86_64-portable.tar.gz"
echo "===============================================" lpm_url="https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-linux"
echo "Installing lite-xl v2.1.0..." tar_filepath="$HOME/install/lite-xl-v2.1.7.tar.gz"
echo "==============================================="
echo
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"
tar_filepath="/tmp/lite-xl.tar.gz"
untar_dir="$HOME/install" untar_dir="$HOME/install"
untar_subdir="$untar_dir/lite-xl"
dest_bin_dir="$HOME/.local/bin"
dest_config_dir="$HOME/.config/lite-xl"
dest_share_dir="$HOME/.local/share"
dest_share_subdir="$dest_share_dir/lite-xl"
wget "$tar_url" -O "$tar_filepath" rm -rf \
mkdir -vp \ "$HOME/.local/bin/lpm" \
"$HOME/install/lite-xl" \
"$HOME/.local/bin/lite-xl" \
"$HOME/.local/share/lite-xl"
mkdir -p \
"$untar_dir" \ "$untar_dir" \
#"$dest_config" \ "$HOME/.local/bin" \
"$dest_bin_dir" \ "$HOME/.local/share/lite-xl"
"$dest_share_dir"
if installed wget; then
wget -q --show-progress "$tar_url" -O "$tar_filepath"
wget -q --show-progress "$lpm_url" -O "$HOME/.local/bin/lpm"
else
curl -fsSL "$tar_url" -o "$tar_filepath"
curl -fsSL "$lpm_url" -o "$HOME/.local/bin/lpm"
fi
chmod +x "$HOME/.local/bin/lpm"
tar -xzf "$tar_filepath" -C "$untar_dir" tar -xzf "$tar_filepath" -C "$untar_dir"
mv -fv "$untar_subdir/lite-xl" "$dest_bin_dir/lite-xl" cp -f "$untar_dir/lite-xl/lite-xl" "$HOME/.local/bin/"
mv -fvT "$untar_subdir/data" "$dest_share_subdir" cp -fr "$untar_dir"/lite-xl/data/* "$HOME/.local/share/lite-xl/"
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 > "$HOME/.local/share/applications/org.lite_xl.lite_xl.desktop"
cat << EOF > "$dest_share_dir/applications/org.lite_xl.lite_xl.desktop"
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=Lite XL Name=Lite XL
Comment=A lightweight text editor written in Lua Comment=A lightweight text editor written in Lua
Exec=env LITE_SCALE=1 ${dest_bin_dir}/lite-xl %F Exec=$HOME/.local/bin/lite-xl %F
Icon=lite-xl Icon=lite-xl
Terminal=false Terminal=false
StartupWMClass=lite-xl StartupWMClass=lite-xl
@@ -45,56 +62,52 @@ Categories=Development;IDE;
MimeType=text/plain; MimeType=text/plain;
EOF EOF
sudo update-desktop-database && \ if command -v update-desktop-database >/dev/null 2>&1; then
sudo update-desktop-database
fi
if command -v xdg-desktop-menu >/dev/null 2>&1; then
xdg-desktop-menu forceupdate xdg-desktop-menu forceupdate
fi
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
echo "Finish!" echo "Finish!"
echo "- $dest_bin_dir/lite-xl"
echo "- $dest_share_subdir"
echo echo
}
remove() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew uninstall --cask lite-xl 2>/dev/null || true
fi
return
fi
echo
echo "==============================================="
echo "Removing lite-xl"
echo "==============================================="
echo
rm -rf \
"$HOME/.local/bin/lite-xl" \
"$HOME/.local/bin/lpm" \
"$HOME/.local/share/applications/org.lite_xl.lite_xl.desktop" \
"$HOME/.local/share/lite-xl" \
"$HOME/.config/lite-xl"
if command -v update-desktop-database >/dev/null 2>&1; then
sudo update-desktop-database
fi
if command -v xdg-desktop-menu >/dev/null 2>&1; then
xdg-desktop-menu forceupdate
fi
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
Executable
+49
View File
@@ -0,0 +1,49 @@
#!/usr/bin/env bash
##makedesc: Install llmfit
# https://github.com/AlexsJones/llmfit
set -eo pipefail
mkdir -p "$HOME/install"
install() {
echo
echo "==============================================="
echo "Installing llmfit (latest)"
echo "==============================================="
echo
curl -fsSL https://llmfit.axjns.dev/install.sh | sh -s -- --local
echo
echo "Finish!"
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading llmfit"
echo "==============================================="
echo
curl -fsSL https://llmfit.axjns.dev/install.sh | sh -s -- --local
echo
echo "Finish!"
}
remove() {
echo
echo "==============================================="
echo "Removing llmfit"
echo "==============================================="
echo
sudo rm -rf "$(which llmfit)"
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+33 -10
View File
@@ -1,16 +1,39 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed) ##makedesc: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed)
echo set -eo pipefail
echo "==============================================="
echo "Installing mariadb (latest)..."
echo "==============================================="
echo
installed() { installed() { command -v "$1" >/dev/null 2>&1; }
command -v "$1" >/dev/null 2>&1
} install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install mariadb
brew services start mariadb
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing mariadb"
echo "==============================================="
echo
sudo apt install -y --autoremove mariadb-server mariadb-client sudo apt install -y --autoremove mariadb-server mariadb-client
sudo mysql_secure_installation sudo mysql_secure_installation
installed "php" && sudo apt install -y --autoremove php-mysql phpmyadmin if installed php; then
sudo apt install -y --autoremove php-mysql phpmyadmin
fi
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/env bash
##makedesc: Install nerd-fonts
set -eo pipefail
#TODO nokia-sans
installed() { command -v "$1" >/dev/null 2>&1; }
isMac() { [ "$(uname -s)" = "Darwin" ]; }
isLinux() { [ "$(uname -s)" = "Linux" ]; }
url="https://github.com/ryanoasis/nerd-fonts/releases/latest/download"
downloadPath="$HOME/install/nerd-fonts"
if isMac; then
installPath="$HOME/Library/Fonts/"
elif isLinux; then
installPath="$HOME/.local/share/fonts/"
else
echo "This OS is not supported yet!"
exit
fi
fontsNames=(
FiraCode
# FiraMono
JetBrainsMono
Meslo
# Noto
RobotoMono
# Ubuntu
# UbuntuMono
# UbuntuSans
)
install() {
echo
echo "==============================================="
echo "Installing nerd-fonts"
echo "==============================================="
echo
[[ -d "$downloadPath" ]] || mkdir -p "$downloadPath"
for fontname in "${fontsNames[@]}"; do
fontDir="$installPath/Nerd-$fontname"
if installed wget; then
wget -q --show-progress "$url/$fontname.tar.xz" -O "$downloadPath/$fontname.tar.xz"
else
curl -fsSL "$url/$fontname.tar.xz" -o "$downloadPath/$fontname.tar.xz"
fi
[[ -d "$installPath/$fontname" ]] || mkdir -p "$fontDir"
tar -xJf "$downloadPath/$fontname.tar.xz" -C "$fontDir"
done
isLinux && fc-cache -vf "$installPath"
echo
echo "Finish!"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing nerd-fonts"
echo "==============================================="
echo
find "$installPath" -type d -name "Nerd-*" -exec rm -rf {} +
isLinux && fc-cache -vf "$installPath"
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+71 -18
View File
@@ -1,30 +1,83 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install nodejs + npm via nvm ##makedesc: Install nodejs + npm via nvm
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
isMac() { [ "$(uname -s)" = "Darwin" ]; }
isLinux() { [ "$(uname -s)" = "Linux" ]; }
NVM_DIR="${NVM_DIR:-$HOME/.nvm}"
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing nodejs..." echo "Installing nodejs + nvm"
echo "===============================================" echo "==============================================="
echo echo
installed() { if isMac; then
command -v "$1" >/dev/null 2>&1 if installed brew; then
} brew install nvm
# sudo apt install -y --autoremove nodejs npm
if !installed "nvm"; then
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
fi
if [ $(nvm current) == 'system' ]; then
echo "WARNING: You already have node installed - removing to install actual version"
sudo apt remove -y --autoremove nodejs npm
else else
nvm install-latest-npm echo "ERROR: Install Homebrew first." >&2
exit 1
fi
elif isLinux; then
curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
else
echo "ERROR: This OS is not supported yet!" >&2
exit 1
fi fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion"
nvm install-latest-npm
nvm install node nvm install node
nvm use node nvm use node
installed "node" && nvm current
nvm ls if ! grep -q 'NVM_DIR' "$HOME/.profile" 2>/dev/null; then
cat << EOF >> "$HOME/.profile"
# nvm (not nvim!)
export NVM_DIR="\$HOME/.nvm"
[ -s "\$NVM_DIR/nvm.sh" ] && source "\$NVM_DIR/nvm.sh"
[ -s "\$NVM_DIR/bash_completion" ] && source "\$NVM_DIR/bash_completion"
EOF
fi
echo
echo "Finish!"
nvm current
echo
}
remove() {
echo
echo "==============================================="
echo "Removing nodejs + nvm"
echo "==============================================="
echo
if command -v nvm >/dev/null 2>&1; then
nvm unload 2>/dev/null || true
fi
rm -rf "$NVM_DIR"
sed -i '/NVM_DIR/d' "$HOME/.profile" 2>/dev/null || true
if isMac && installed brew; then
brew uninstall nvm 2>/dev/null || true
fi
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+28 -14
View File
@@ -1,25 +1,39 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install ntfy (latest) + ppa ##makedesc: Install ntfy (latest) + ppa
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: ntfy apt/ppa install is not supported on macOS. Use 'brew install ntfy' instead." >&2
exit 1
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing ntfy (latest) + ppa..." echo "Installing ntfy"
echo "===============================================" echo "==============================================="
echo echo
# https://ntfy.sh/docs/install/#general-steps # https://ntfy.sh/docs/install/#general-steps
installed() { installed curl || sudo apt install -y curl
command -v "$1" >/dev/null 2>&1
curl -sSL https://archive.heckel.io/apt/pubkey.txt | sudo apt-key add -
sudo apt install -y 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 -y ntfy
sudo systemctl enable ntfy
sudo systemctl start ntfy
echo
echo "Finish!"
echo
} }
! installed curl && sudo apt install -y curl case "$1" in
*) install ;;
curl -sSL https://archive.heckel.io/apt/pubkey.txt | sudo apt-key add - && \ esac
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
Executable
+106
View File
@@ -0,0 +1,106 @@
#!/usr/bin/env bash
##makedesc: Install nvim + lazyvim
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
# https://www.lazyvim.org/installation
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
# TODO https://github.com/rockerBOO/awesome-neovim
# TODO https://docs.astronvim.com
isMac() { [ "$(uname -s)" = "Darwin" ]; }
isLinux() { [ "$(uname -s)" = "Linux" ]; }
if isLinux; then
url="https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz"
nvimDirName="nvim-linux-x86_64"
elif isMac; then
url="https://github.com/neovim/neovim/releases/latest/download/nvim-macos-x86_64.tar.gz"
nvimDirName="nvim-macos-x86_64"
fi
downloadPath="$HOME/install"
downloadTarGz="$downloadPath/nvim.tar.gz"
installPath="/opt/nvim"
cfgPath="$HOME/.config/nvim"
nvimDataPaths=(
"$cfgPath"
"$HOME/.local/share/nvim"
"$HOME/.local/state/nvim"
"$HOME/.cache/nvim"
)
backup() {
echo "Backup configuration files..."
t=$(date +'%s')
for path in "${nvimDataPaths[@]}"; do
[[ -d "$path" ]] && cp -rv "$path" "$path-$t.bak"
done
echo "Done"
}
install() {
echo
echo "==============================================="
echo "Installing neovim"
echo "==============================================="
echo
backup
if installed wget; then
wget -q --show-progress "$url" -O "$downloadTarGz"
else
curl -fsSL "$url" -o "$downloadTarGz"
fi
tar -xzf "$downloadTarGz" -C "$downloadPath"
sudo rm -rf "$installPath"
sudo mv "$downloadPath/$nvimDirName" "$installPath"
if [ -d "$cfgPath" ]; then
rm -rf "$cfgPath"
fi
git clone --depth=1 --single-branch https://github.com/LazyVim/starter "$cfgPath"
rm -rf "$cfgPath/.git"
if command -v update-desktop-database >/dev/null 2>&1; then
sudo update-desktop-database
fi
if command -v xdg-desktop-menu >/dev/null 2>&1; then
xdg-desktop-menu forceupdate
fi
echo
echo "Finish!"
nvim -v
echo
}
remove() {
echo
echo "==============================================="
echo "Removing neovim"
echo "==============================================="
echo
sudo rm -rf "$installPath"
for path in "${nvimDataPaths[@]}"; do
rm -rf "$path"
done
find "$HOME/.config" -type f -path "*/nvim*" -exec rm -rfv {} + 2>/dev/null || true
find "$HOME/.local" -type f -path "*/nvim*" -exec rm -rfv {} + 2>/dev/null || true
echo
echo "Finish!"
echo
}
case "$1" in
b|backup) backup ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+26 -2
View File
@@ -1,10 +1,34 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install obs-studio (latest snap) ##makedesc: Install obs-studio (latest snap)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask obs
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing obs-studio (latest snap)..." echo "Installing obs-studio"
echo "===============================================" echo "==============================================="
echo echo
sudo snap install obs-studio sudo snap install obs-studio
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
Executable
+58
View File
@@ -0,0 +1,58 @@
#!/usr/bin/env bash
##makedesc: Install ollama
# https://github.com/ollama/ollama
set -eo pipefail
install() {
echo
echo "==============================================="
echo "Installing ollama"
echo "==============================================="
echo
curl -fsSL https://ollama.com/install.sh | sh
echo
echo "Finish!"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing ollama"
echo "==============================================="
echo
if [ "$(uname -s)" = "Darwin" ]; then
sudo rm -rf /usr/local/bin/ollama /usr/local/lib/ollama ~/.ollama
else
# https://docs.ollama.com/linux#uninstall
sudo systemctl stop ollama 2>/dev/null || true
sudo systemctl disable ollama 2>/dev/null || true
sudo rm -f /etc/systemd/system/ollama.service 2>/dev/null || true
if command -v ollama >/dev/null 2>&1; then
sudo rm -rf "$(dirname "$(dirname "$(which ollama)")")/lib/ollama" 2>/dev/null || true
sudo rm -f "$(which ollama)"
fi
sudo userdel ollama 2>/dev/null || true
sudo groupdel ollama 2>/dev/null || true
sudo rm -rf \
/usr/bin/ollama \
/usr/share/ollama \
/usr/local/lib/ollama \
/usr/local/bin/ollama
fi
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+60 -10
View File
@@ -1,19 +1,69 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install omz (latest) ##makedesc: Install omz (latest)
echo set -eo pipefail
echo "==============================================="
echo "Installing omz (latest)..."
echo "==============================================="
echo
installed() { installed() { command -v "$1" >/dev/null 2>&1; }
command -v "$1" >/dev/null 2>&1
} install() {
echo
echo "==============================================="
echo "Installing omz"
echo "==============================================="
echo
if ! installed zsh || ! installed git || ! installed curl; then if ! installed zsh || ! installed git || ! installed curl; then
echo "ERROR: you need git, zsh and curl to be installed!" echo "ERROR: you need git, zsh and curl to be installed!" >&2
exit 1 exit 1
fi fi
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo
echo "Finish!"
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading omz"
echo "==============================================="
echo
if [ -d "$ZSH" ]; then
bash "$ZSH/tools/upgrade.sh"
else
echo "ERROR: OMZ not found." >&2
exit 1
fi
echo
echo "Finish!"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing omz"
echo "==============================================="
echo
if [ -d "$ZSH" ]; then
bash "$ZSH/tools/uninstall.sh"
else
echo "WARNING: OMZ not found, cleaning up." >&2
fi
rm -rf "$HOME/.oh-my-zsh"
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+35 -18
View File
@@ -1,23 +1,26 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install omz fancy (powerline10k + MesloLGS font) ##makedesc: Install omz fancy (powerline10k + MesloLGS font)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
isMac() { [ "$(uname -s)" = "Darwin" ]; }
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing omz fancy: powerline10k + MesloLGS font..." echo "Installing omz fancy: powerline10k + MesloLGS font"
echo "===============================================" echo "==============================================="
echo echo
installed() { if ! installed zsh || ! installed git; then
command -v "$1" >/dev/null 2>&1 echo "ERROR: you need git and zsh to be installed!" >&2
}
if ! installed zsh || ! installed git || ! installed wget; then
echo "ERROR: you need git, zsh and wget to be installed!"
exit 1 exit 1
fi fi
if [[ ! -d "$HOME/.oh-my-zsh" ]]; then if [[ ! -d "$HOME/.oh-my-zsh" ]]; then
echo "ERROR: you need omz to be installed!" echo "ERROR: you need omz to be installed!" >&2
exit 1 exit 1
fi fi
@@ -25,22 +28,31 @@ echo
echo "1/3 Installing MesloLGS fonts..." echo "1/3 Installing MesloLGS fonts..."
mkdir -p "$HOME/.local/share/fonts/" mkdir -p "$HOME/.local/share/fonts/"
FONTS_URL="https://github.com/romkatv/powerlevel10k-media/raw/master" 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" if installed wget; then
wget "$FONTS_URL/MesloLGS%20NF%20Bold.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Bold.ttf" wget -q --show-progress "$FONTS_URL/MesloLGS%20NF%20Regular.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Regular.ttf"
wget "$FONTS_URL/MesloLGS%20NF%20Italic.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Italic.ttf" wget -q --show-progress "$FONTS_URL/MesloLGS%20NF%20Bold.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Bold.ttf"
wget "$FONTS_URL/MesloLGS%20NF%20Bold%20Italic.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Bold Italic.ttf" wget -q --show-progress "$FONTS_URL/MesloLGS%20NF%20Italic.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Italic.ttf"
wget -q --show-progress "$FONTS_URL/MesloLGS%20NF%20Bold%20Italic.ttf" -O "$HOME/.local/share/fonts/MesloLGS NF Bold Italic.ttf"
else
curl -fsSL "$FONTS_URL/MesloLGS%20NF%20Regular.ttf" -o "$HOME/.local/share/fonts/MesloLGS NF Regular.ttf"
curl -fsSL "$FONTS_URL/MesloLGS%20NF%20Bold.ttf" -o "$HOME/.local/share/fonts/MesloLGS NF Bold.ttf"
curl -fsSL "$FONTS_URL/MesloLGS%20NF%20Italic.ttf" -o "$HOME/.local/share/fonts/MesloLGS NF Italic.ttf"
curl -fsSL "$FONTS_URL/MesloLGS%20NF%20Bold%20Italic.ttf" -o "$HOME/.local/share/fonts/MesloLGS NF Bold Italic.ttf"
fi
if command -v fc-cache >/dev/null 2>&1; then
fc-cache -vf "$HOME/.local/share/fonts/" fc-cache -vf "$HOME/.local/share/fonts/"
fi
echo echo
echo "2/3 Installing powerlevel10k theme..." 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 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" sed -i.bak 's#^ZSH_THEME=.*$#ZSH_THEME="powerlevel10k/powerlevel10k"#g' "$HOME/.zshrc"
echo echo
echo "3/3 Installing plugins..." 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 --depth=1 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 git clone --depth=1 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 sed -i.bak 's/^plugins=/plugins=(git laravel docker docker-compose composer zsh-autosuggestions zsh-syntax-highlighting)/g' "$HOME/.zshrc"
p10k configure p10k configure
echo echo
@@ -49,3 +61,8 @@ echo "- review your plugins in $HOME/.zshrc"
echo "- restart terminal windows to reload fonts and set 'MesloLGS NF Regular' as default font" 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 "- log out of your session and login again"
echo echo
}
case "$1" in
*) install ;;
esac
+80
View File
@@ -0,0 +1,80 @@
#!/usr/bin/env bash
##makedesc: Install openvpn v2.6.3 (src)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
require() {
local missing=()
for pkg in "$@"; do
installed "$pkg" || missing+=("$pkg")
done
if [ ${#missing[@]} -gt 0 ]; then
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install "${missing[@]}"
else
echo "ERROR: Missing: ${missing[*]}. Install manually or use brew." >&2
exit 1
fi
else
sudo apt install -y "${missing[@]}"
fi
fi
}
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
unpack_targz() {
tar -xzvf "$1" -C "$2"
}
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install openvpn
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing openvpn"
echo "==============================================="
echo
# https://openvpn.net/community-downloads/
# https://openvpn.net/community-resources/installing-openvpn/
OVPNVER='2.6.3'
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"
unpack_targz "$HOME/install/openvpn-${OVPNVER}.tar.gz" "$HOME/install/"
cd "$HOME/install/openvpn-${OVPNVER}"
sudo ./configure
sudo make
sudo make install
sudo apt install -y network-manager-openvpn network-manager-openvpn-gnome
echo
echo "Finish!"
openvpn --version
echo
}
case "$1" in
*) install ;;
esac
+46 -24
View File
@@ -1,33 +1,55 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install papirus-icon-theme (latest) ##makedesc: Install papirus-icon-theme (latest)
echo set -eo pipefail
echo "==============================================="
echo "Installing papirus-icon-theme (latest)..."
echo "==============================================="
echo
installed() { installed() { command -v "$1" >/dev/null 2>&1; }
command -v "$1" >/dev/null 2>&1
}
if installed git; then if [ "$(uname -s)" = "Darwin" ]; then
mkdir -p "${HOME}/install/" echo "ERROR: Papirus icon theme is not supported on macOS." >&2
git clone https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git --depth=1 "${HOME}/install/papirus-icon-theme" exit 1
else
! installed wget && sudo apt install -y wget
mkdir -p "${HOME}/install/papirus-icon-theme"
wget https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "${HOME}/install/papirus-icon-theme.zip"
unzip "${HOME}/install/papirus-icon-theme.zip" -d "${HOME}/install/papirus-icon-theme"
fi fi
mkdir -p "${HOME}/.local/share/icons/" download() {
ln -sf "${HOME}/install/papirus-icon-theme/Papirus" "${HOME}/.local/share/icons/Papirus" if installed wget; then
ln -sf "${HOME}/install/papirus-icon-theme/Papirus-Dark" "${HOME}/.local/share/icons/Papirus-Dark" wget -q --show-progress "$1" -O "$2"
ln -sf "${HOME}/install/papirus-icon-theme/Papirus-Light" "${HOME}/.local/share/icons/Papirus-Light" else
curl -fsSL "$1" -o "$2"
fi
}
install() {
echo
echo "==============================================="
echo "Installing papirus-icon-theme"
echo "==============================================="
echo
if installed git; then
sudo git clone \
--depth 1 \
--single-branch \
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git \
/usr/src/papirus-icon-theme
sudo chown "$(whoami)": -R /usr/src/papirus-icon-theme
else
download https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip /tmp/papirus-icon-theme.zip
sudo unzip -oq /tmp/papirus-icon-theme.zip -d /usr/src/papirus-icon-theme
rm -f /tmp/papirus-icon-theme.zip
fi
sudo ln -sf /usr/src/papirus-icon-theme/Papirus /usr/share/icons/Papirus
sudo ln -sf /usr/src/papirus-icon-theme/Papirus-Dark /usr/share/icons/Papirus-Dark
sudo ln -sf /usr/src/papirus-icon-theme/Papirus-Light /usr/share/icons/Papirus-Light
echo echo
echo "Finish! Don't forget to change current icon theme." echo "Finish!"
echo "You can find them here:" echo "You can find icons in /usr/share/icons/"
echo -e "\t${HOME}/.local/share/icons/"
echo echo
}
case "$1" in
*) install ;;
esac
+54 -10
View File
@@ -1,16 +1,60 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install postgresql (latest) and php-pgsql (if php is installed) ##makedesc: Install postgresql (latest) and php-pgsql (if php is installed)
echo set -eo pipefail
echo "==============================================="
echo "Installing postgresql (latest)..."
echo "==============================================="
echo
installed() { installed() { command -v "$1" >/dev/null 2>&1; }
command -v "$1" >/dev/null 2>&1
require() {
local missing=()
for pkg in "$@"; do
installed "$pkg" || missing+=("$pkg")
done
if [ ${#missing[@]} -gt 0 ]; then
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install "${missing[@]}"
else
echo "ERROR: Missing: ${missing[*]}. Install manually or use brew." >&2
exit 1
fi
else
sudo apt install -y "${missing[@]}"
fi
fi
} }
sudo apt install -y --autoremove postgresql postgresql-contrib install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install postgresql
brew services start postgresql
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing postgresql"
echo "==============================================="
echo
require postgresql postgresql-contrib
sudo service postgresql restart sudo service postgresql restart
installed 'php' && sudo apt install -y --autoremove php-pgsql
if installed php; then
sudo apt install -y --autoremove php-pgsql phpmyadmin
fi
echo
echo "Finish!"
postgres --version
echo
}
case "$1" in
*) install ;;
esac
+43 -19
View File
@@ -1,34 +1,58 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install php v8.1 + ppa ##makedesc: Install php v8.4
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install php
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
PHPVER="8.4"
[ $1 ] && PHPVER="$1" || PHPVER="8.1"
echo echo
echo "===============================================" echo "==============================================="
echo "Installing php${PHPVER}..." echo "Installing php ${PHPVER}"
echo "===============================================" echo "==============================================="
echo echo
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}-fpm \
php${PHPVER}-dev \
php${PHPVER}-apcu \
php${PHPVER}-bcmath \
php${PHPVER}-cli \ php${PHPVER}-cli \
php${PHPVER}-common \ php${PHPVER}-common \
php${PHPVER}-xdebug \
php${PHPVER}-dom \
php${PHPVER}-curl \ php${PHPVER}-curl \
php${PHPVER}-bcmath \ php${PHPVER}-dom \
php${PHPVER}-gd \ php${PHPVER}-gd \
php${PHPVER}-intl \ php${PHPVER}-intl \
php${PHPVER}-mbstring \ php${PHPVER}-mbstring \
# php${PHPVER}-mysql \ php${PHPVER}-mysql \
# php${PHPVER}-opcache \ php${PHPVER}-opcache \
# php${PHPVER}-pgsql \ php${PHPVER}-pgsql \
php${PHPVER}-simplexml \
php${PHPVER}-soap \ php${PHPVER}-soap \
# php${PHPVER}-xml \ php${PHPVER}-sqlite3 \
# php${PHPVER}-xmlrpc \ php${PHPVER}-xdebug \
# php${PHPVER}-xsl \ php${PHPVER}-xml \
# php${PHPVER}-sqlite3 \ php${PHPVER}-xmlrpc \
# php${PHPVER}-zip \ php${PHPVER}-zip
# php${PHPVER}-dba \
# php${PHPVER}-ldap echo
echo "Finish!"
php -v php -v
echo
}
case "$1" in
*) install ;;
esac
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
##makedesc: Install psalm
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing psalm"
echo "==============================================="
echo
if ! installed php; then
echo "ERROR: You need php to be installed" >&2
exit 1
fi
if ! installed composer; then
echo "ERROR: You need composer to be installed" >&2
exit 2
fi
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
if ! grep -qoh "$NEWPATH" "$HOME/.profile" 2>/dev/null; then
echo "$NEWPATH" >> "$HOME/.profile"
fi
# shellcheck source=/dev/null
source "$HOME/.profile"
composer global require vimeo/psalm --dev
echo
echo "Finish!"
psalm --version
echo
}
case "$1" in
*) install ;;
esac
+68
View File
@@ -0,0 +1,68 @@
#!/usr/bin/env bash
##makedesc: Install php-spx
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: php-spx is not supported on macOS (requires Linux PHP extension build)." >&2
exit 1
fi
echo
echo "==============================================="
echo "Installing php-spx"
echo "==============================================="
echo
if ! installed php; then
echo "ERROR: You need php to be installed" >&2
exit 1
fi
if ! installed phpize; then
echo "ERROR: You need php-dev to be installed" >&2
exit 2
fi
if ! installed make; then
sudo apt install -y make
fi
mkdir -p "$HOME/install/php-spx"
if installed wget; then
wget -q --show-progress https://github.com/NoiseByNorthwest/php-spx/archive/refs/heads/release/latest.zip -O /tmp/php-spx.zip
else
curl -fsSL https://github.com/NoiseByNorthwest/php-spx/archive/refs/heads/release/latest.zip -o /tmp/php-spx.zip
fi
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
}
case "$1" in
*) install ;;
esac
Executable
+45
View File
@@ -0,0 +1,45 @@
#!/usr/bin/env bash
##makedesc: Install phpcs + php-cs-fixer
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing phpcs + php-cs-fixer"
echo "==============================================="
echo
if ! installed php; then
echo "ERROR: You need php to be installed" >&2
exit 1
fi
if ! installed composer; then
echo "ERROR: You need composer to be installed" >&2
exit 2
fi
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
if ! grep -qoh "$NEWPATH" "$HOME/.profile" 2>/dev/null; then
echo "$NEWPATH" >> "$HOME/.profile"
fi
# shellcheck source=/dev/null
source "$HOME/.profile"
composer global require squizlabs/php_codesniffer --dev
composer global require friendsofphp/php-cs-fixer --dev
echo
echo "Finish!"
phpcs --version
php-cs-fixer --version
echo
}
case "$1" in
*) install ;;
esac
Executable
+43
View File
@@ -0,0 +1,43 @@
#!/usr/bin/env bash
##makedesc: Install phpmd
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing phpmd"
echo "==============================================="
echo
if ! installed php; then
echo "ERROR: You need php to be installed" >&2
exit 1
fi
if ! installed composer; then
echo "ERROR: You need composer to be installed" >&2
exit 2
fi
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
if ! grep -qoh "$NEWPATH" "$HOME/.profile" 2>/dev/null; then
echo "$NEWPATH" >> "$HOME/.profile"
fi
# shellcheck source=/dev/null
source "$HOME/.profile"
composer global require phpmd/phpmd --dev
echo
echo "Finish!"
phpmd --version
echo
}
case "$1" in
*) install ;;
esac
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
##makedesc: Install phpstan
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing phpstan"
echo "==============================================="
echo
if ! installed php; then
echo "ERROR: You need php to be installed" >&2
exit 1
fi
if ! installed composer; then
echo "ERROR: You need composer to be installed" >&2
exit 2
fi
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
if ! grep -qoh "$NEWPATH" "$HOME/.profile" 2>/dev/null; then
echo "$NEWPATH" >> "$HOME/.profile"
fi
# shellcheck source=/dev/null
source "$HOME/.profile"
composer global require phpstan/phpstan --dev
echo
echo "Finish!"
phpstan --version
echo
}
case "$1" in
*) install ;;
esac
+44
View File
@@ -0,0 +1,44 @@
#!/usr/bin/env bash
##makedesc: Install phpunit
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing phpunit"
echo "==============================================="
echo
if ! installed php; then
echo "ERROR: You need php to be installed" >&2
exit 1
fi
if ! installed composer; then
echo "ERROR: You need composer to be installed" >&2
exit 2
fi
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
if ! grep -qoh "$NEWPATH" "$HOME/.profile" 2>/dev/null; then
echo "$NEWPATH" >> "$HOME/.profile"
fi
# shellcheck source=/dev/null
source "$HOME/.profile"
composer global require phpunit/phpunit --dev
echo
echo "Finish!"
phpunit --version
echo
}
case "$1" in
*) install ;;
esac
+52 -13
View File
@@ -1,28 +1,67 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install postman (latest) ##makedesc: Install postman (latest)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
unpack_targz() {
tar -xzvf "$1" -C "$2"
}
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask postman
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing postman (latest)..." echo "Installing postman"
echo "===============================================" echo "==============================================="
echo echo
mkdir -p ${HOME}/install/postman # https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
mkdir -p ${HOME}/.local/bin
wget "https://dl.pstmn.io/download/latest/linux64" -O ${HOME}/install/postman.tar.gz && \
tar -xzf ${HOME}/install/postman.tar.gz -C ${HOME}/install/postman && \
ln -sf ${HOME}/install/postman/Postman/Postman ${HOME}/.local/bin/postman && \
mkdir -p "${HOME}/.local/share/applications" && \
cat << EOF > "${HOME}/.local/share/applications/Postman.desktop"
#!/usr/bin/env xdg-open
mkdir -p "$HOME/install" "$HOME/.local/bin" "$HOME/.local/share/applications"
download "https://dl.pstmn.io/download/latest/linux64" "$HOME/install/postman.tar.gz"
unpack_targz "$HOME/install/postman.tar.gz" "$HOME/install"
ln -sf "$HOME/install/Postman/Postman" "$HOME/.local/bin/postman"
cat << EOF > "$HOME/.local/share/applications/Postman.desktop"
[Desktop Entry] [Desktop Entry]
Name=Postman Name=Postman
Exec=${HOME}/.local/bin/postman Exec=$HOME/.local/bin/postman %U
Icon=${HOME}/install/postman/Postman/app/icons/icon_128x128.png Icon=$HOME/install/Postman/app/resources/app/assets/icon.png
Categories=Utility,Network Categories=Development,Network
Terminal=false Terminal=false
Type=Application Type=Application
Encoding=UTF-8 Encoding=UTF-8
EOF EOF
if command -v update-desktop-database >/dev/null 2>&1; then
sudo update-desktop-database sudo update-desktop-database
fi
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+24 -2
View File
@@ -1,9 +1,22 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install qt5 ##makedesc: Install qt5
set -eo pipefail
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if command -v brew >/dev/null 2>&1; then
brew install qt@5
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing qt5..." echo "Installing qt5"
echo "===============================================" echo "==============================================="
echo echo
@@ -23,3 +36,12 @@ sudo apt install -y --autoremove \
qtbase5-dev \ qtbase5-dev \
qttools5-dev \ qttools5-dev \
qttools5-dev-tools qttools5-dev-tools
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+61 -10
View File
@@ -1,20 +1,71 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install rustdesk client v1.1.9 (deb) ##makedesc: Install rustdesk client v1.4.2 (deb)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask rustdesk
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
RDVER="1.4.9"
[ $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
deb_path="${HOME}/install" deb_path="$HOME/install"
deb_name="rustdesk_${RDVER}.deb" deb_name="rustdesk-${RDVER}.deb"
mkdir -p $deb_path mkdir -p "$deb_path"
deb="$deb_path/$deb_name" deb="$deb_path/$deb_name"
sudo apt install libxdo3 python3-pip && \ sudo apt install -y libxdo3 python3-pip
wget "http://github.com/rustdesk/rustdesk/releases/download/${RDVER}/$deb_name" -O $deb && \ if installed wget; then
sudo dpkg -i $deb wget -q --show-progress "https://github.com/rustdesk/rustdesk/releases/download/${RDVER}/${deb_name}" -O "$deb"
else
curl -fsSL "https://github.com/rustdesk/rustdesk/releases/download/${RDVER}/${deb_name}" -o "$deb"
fi
sudo dpkg -i "$deb"
echo
echo "Finish!"
echo
}
remove() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew uninstall --cask rustdesk
fi
return
fi
echo
echo "==============================================="
echo "Removing rustdesk"
echo "==============================================="
echo
sudo dpkg -r rustdesk 2>/dev/null || true
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+25 -27
View File
@@ -1,43 +1,41 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install bunch of software from snap ##makedesc: Install bunch of software from snap
echo set -eo pipefail
echo "==============================================="
echo "Installing software from snap..."
echo "==============================================="
echo
installed() { if [ "$(uname -s)" = "Darwin" ]; then
command -v "$1" >/dev/null 2>&1 echo "ERROR: snap is not supported on macOS. Use brew instead." >&2
} exit 1
fi
installed() { command -v "$1" >/dev/null 2>&1; }
snapi() { snapi() {
snap install $1 2>/dev/null snap install "$1" 2>/dev/null || snap install "$1" --classic
[[ $? -ne 0 ]] && snap install $1 --classic
} }
install() {
echo
echo "==============================================="
echo "Installing software from snap"
echo "==============================================="
echo
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
fi fi
# snapi snap-store
# snapi gtk-common-themes
# snapi gtk2-common-themes
snapi peek snapi peek
snapi telegram-desktop
snapi code
snapi skype snapi skype
snapi dbeaver-ce snapi dbeaver-ce
# snapi mysql-workbench-community
# snapi discord
# snapi phpstorm
# snapi audacity
# snapi flameshot # deb
# snapi zoom-client # deb
# https://certbot.eff.org/ echo
# snapi certbot echo "Finish!"
# sudo ln -sf /snap/bin/certbot /usr/bin/certbot echo
}
case "$1" in
*) install ;;
esac
+78
View File
@@ -0,0 +1,78 @@
#!/usr/bin/env bash
##makedesc: Install Sublime Merge
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask sublime-merge
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing Sublime Merge"
echo "==============================================="
echo
# https://www.sublimemerge.com/download
SMVER='2102'
mkdir -p "$HOME/install"
DEB_PATH="$HOME/install/sublime-merge_build-${SMVER}_amd64.deb"
BIN_PATH="/opt/sublime_merge/sublime_merge"
if [[ ! -f "$DEB_PATH" ]]; then
download "https://download.sublimetext.com/sublime-merge_build-${SMVER}_amd64.deb" "$DEB_PATH"
fi
sudo dpkg -i "$DEB_PATH"
echo
echo "Finish!"
$BIN_PATH --version
echo
}
remove() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew uninstall --cask sublime-merge
fi
return
fi
echo
echo "==============================================="
echo "Removing Sublime Merge"
echo "==============================================="
echo
sudo dpkg -r sublime-merge 2>/dev/null || true
sudo rm -rf /opt/sublime_merge
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+87
View File
@@ -0,0 +1,87 @@
#!/usr/bin/env bash
##makedesc: Install Sublime Text
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask sublime-text
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing Sublime Text"
echo "==============================================="
echo
# https://www.sublimetext.com/download
STVER='4200'
mkdir -p "$HOME/install"
DEB_PATH="$HOME/install/sublime-text_build-${STVER}_amd64.deb"
BIN_PATH="/opt/sublime_text/sublime_text"
if [[ ! -f "$DEB_PATH" ]]; then
download "https://download.sublimetext.com/sublime-text_build-${STVER}_amd64.deb" "$DEB_PATH"
fi
sudo dpkg -i "$DEB_PATH"
sudo cp -f "$BIN_PATH" "$BIN_PATH.old"
if [[ $STVER = 4169 ]]; then
echo "00489f39: c640 0501 4885 c9" | sudo xxd -r - "$BIN_PATH"
elif [[ $STVER = 4200 ]]; then
sudo sed -i 's#\x0F\xB6\x51\x05\x83\xF2\x01#\xC6\x41\x05\x01\xB2\x00\x90#' "$BIN_PATH"
else
sudo sed -i 's#\x80\x79\x05\x00\x0F\x94\xC2#\xC6\x41\x05\x01\xB2\x00\x90#' "$BIN_PATH"
fi
echo
echo "Finish!"
$BIN_PATH --version
echo
}
remove() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew uninstall --cask sublime-text
fi
return
fi
echo
echo "==============================================="
echo "Removing Sublime Text"
echo "==============================================="
echo
sudo dpkg -r sublime-text 2>/dev/null || true
sudo rm -rf /opt/sublime_text
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
Executable
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
##makedesc: Samsung Unified Linux Driver repo
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
install() {
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: Samsung Unified Linux Driver is not supported on macOS." >&2
exit 1
fi
echo
echo "==============================================="
echo "Installing Samsung Unified Linux Driver"
echo "==============================================="
echo
# https://www.bchemnet.com/suldr/
# https://www.bchemnet.com/suldr/supported.html
mkdir -p "$HOME/install"
sudo bash -c 'echo "deb https://www.bchemnet.com/suldr/ debian extra" >> /etc/apt/sources.list.d/samsung.list'
download \
https://www.bchemnet.com/suldr/pool/debian/extra/su/suldr-keyring_3_all.deb \
"$HOME/install/suldr-keyring_3_all.deb"
sudo dpkg -i "$HOME/install/suldr-keyring_3_all.deb"
sudo apt install -y suld-driver2-1.00.39
echo
echo "Finish!"
echo "Don't forget to connect your Samsung printer"
echo "See more info here: https://www.bchemnet.com/suldr/"
echo
}
case "$1" in
*) install ;;
esac
+40 -10
View File
@@ -1,9 +1,33 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install syncthing (latest) + ppa ##makedesc: Install syncthing (latest) + ppa
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install syncthing
brew services start syncthing
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing syncthing (latest) + ppa..." echo "Installing syncthing"
echo "===============================================" echo "==============================================="
echo echo
@@ -12,17 +36,23 @@ echo
# Add the release PGP keys: # Add the release PGP keys:
sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
# Add the "stable" channel to your APT sources: # Add the channels to APT sources:
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Add the "candidate" channel to your APT sources:
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate" | sudo tee /etc/apt/sources.list.d/syncthing.list echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Update and install syncthing:
sudo apt update sudo apt update
sudo apt install -y --autoremove syncthing 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 mkdir -p "$HOME/.local/share/applications" "$HOME/.config/autostart"
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O $HOME/.local/share/applications/syncthing-ui.desktop download "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" "$HOME/.local/share/applications/syncthing-start.desktop"
ln -sf $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop download "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" "$HOME/.local/share/applications/syncthing-ui.desktop"
# или демоном: https://habr.com/ru/post/350892/ ln -sf "$HOME/.local/share/applications/syncthing-start.desktop" "$HOME/.config/autostart/syncthing-start.desktop"
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+14 -9
View File
@@ -1,18 +1,23 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install telebit (latest) ##makedesc: Install telebit (latest)
set -eo pipefail
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing telebit (latest)..." echo "Installing telebit"
echo "===============================================" echo "==============================================="
echo echo
# https://git.coolaj86.com/coolaj86/telebit.js#install # https://git.coolaj86.com/coolaj86/telebit.js#install
curl -fsSL https://get.telebit.io/ | bash
# export NODEJS_VER=v10.2 # v10.2 is tested working, but we can test other versions echo
# export TELEBIT_VERSION=master # git tag or branch to install from echo "Finish!"
# export TELEBIT_USERSPACE=no # install as a system service (launchd, systemd only) echo
# export TELEBIT_PATH=/opt/telebit }
# export TELEBIT_USER=telebit
# export TELEBIT_GROUP=telebit case "$1" in
curl https://get.telebit.io/ | bash *) install ;;
esac
+40
View File
@@ -0,0 +1,40 @@
#!/usr/bin/env bash
##makedesc: Install telegram (latest)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask telegram
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing telegram"
echo "==============================================="
echo
mkdir -p "$HOME/install" "$HOME/.local/bin"
if installed wget; then
wget -q --show-progress "https://telegram.org/dl/desktop/linux" -O "$HOME/install/telegram.tar.gz"
else
curl -fsSL "https://telegram.org/dl/desktop/linux" -o "$HOME/install/telegram.tar.gz"
fi
tar -xJf "$HOME/install/telegram.tar.gz" -C "$HOME/.local/bin"
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
Executable
+56
View File
@@ -0,0 +1,56 @@
#!/usr/bin/env bash
##makedesc: Install tilt (k8s dev env)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
isMac() { [ "$(uname -s)" = "Darwin" ]; }
install() {
echo
echo "==============================================="
echo "Installing tilt"
echo "==============================================="
echo
mkdir -p ~/install/tilt ~/.local/bin
if isMac; then
if installed brew; then
brew install kubectl tilt-dev/tap/ctlptl tilt-dev/tap/tilt
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
else
cd ~/install/tilt
KUBECTL_VERSION=$(curl -L -s https://dl.k8s.io/release/stable.txt)
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
curl -LO "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256"
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
chmod +x kubectl
cp ./kubectl ~/.local/bin/kubectl
CTLPTL_URL=$(curl -s "https://api.github.com/repos/tilt-dev/ctlptl/releases/latest" \
| jq -r '.assets.[] | select(.name | test("linux.x86_64.tar.gz")).browser_download_url')
curl -fsSL "$CTLPTL_URL" | tar -xz -C ~/.local/bin ctlptl
TILT_URL=$(curl -s "https://api.github.com/repos/tilt-dev/tilt/releases/latest" \
| jq -r '.assets.[] | select(.name | test("linux.x86_64.tar.gz")).browser_download_url')
curl -fsSL "$TILT_URL" | tar -xz -C ~/.local/bin tilt
fi
echo
echo "Finish!"
echo "ctlptl version = $(ctlptl version)"
echo "tilt version = $(tilt version)"
echo "kubectl version:"
kubectl version
echo
}
case "$1" in
*) install ;;
esac
+23 -4
View File
@@ -1,11 +1,30 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install ulauncher (latest) + ppa ##makedesc: Install ulauncher (latest) + ppa
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: ulauncher is not supported on macOS. Use Alfred or Raycast instead." >&2
exit 1
fi
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing ulauncher (latest) + ppa..." echo "Installing ulauncher"
echo "===============================================" echo "==============================================="
echo echo
sudo add-apt-repository -y ppa:agornostal/ulauncher sudo add-apt-repository universe -y
sudo apt install -y --autoremove ulauncher sudo add-apt-repository ppa:agornostal/ulauncher -y
sudo apt update
sudo apt install -y ulauncher
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
Executable
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env bash
##makedesc: Install uv (fast Python package manager)
# https://github.com/astral-sh/uv
set -eo pipefail
install() {
echo
echo "==============================================="
echo "Installing uv (fast Python package manager)"
echo "==============================================="
echo
curl -LsSf https://astral.sh/uv/install.sh | sh
echo
echo "Finish!"
uv --version
echo
}
remove() {
echo
echo "==============================================="
echo "Removing uv"
echo "==============================================="
echo
rm -rf "$HOME/.local/bin/uv" \
"$HOME/.local/bin/uvx" \
"$HOME/.local/share/uv"
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+63 -9
View File
@@ -1,20 +1,74 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install Vivaldi + ppa ##makedesc: Install Vivaldi + ppa
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
doInstall() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask vivaldi
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing Vivaldi"
echo "==============================================="
echo
# https://repo.vivaldi.com
# https://help.vivaldi.com/desktop/#install-update # https://help.vivaldi.com/desktop/#install-update
# https://help.vivaldi.com/desktop/install-update/manual-setup-vivaldi-linux-repositories/
if installed wget; then
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor > packages.vivaldi.gpg
else
curl -fsSL https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor > packages.vivaldi.gpg
fi
sudo install -o root -g root -m 644 packages.vivaldi.gpg /etc/apt/trusted.gpg.d
sudo sh -c 'echo "deb [arch=amd64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.vivaldi.gpg] https://repo.vivaldi.com/archive/deb stable main" > /etc/apt/sources.list.d/vivaldi.list'
rm -f packages.vivaldi.gpg
sudo apt update
sudo apt install -y vivaldi-stable
echo
echo "Finish!"
echo
}
remove() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew uninstall --cask vivaldi
fi
return
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing Vivaldi + ppa..." echo "Removing Vivaldi"
echo "===============================================" echo "==============================================="
echo echo
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub \ sudo apt remove -y vivaldi-stable
| gpg --dearmor \ sudo rm -rf \
| sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg /usr/share/keyrings/vivaldi-browser.gpg \
/etc/apt/sources.list.d/vivaldi-archive.list \
/etc/apt/sources.list.d/vivaldi.list
sudo apt update
echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" \ echo
| sudo dd of=/etc/apt/sources.list.d/vivaldi-archive.list echo "Finish!"
echo
}
sudo apt update && sudo apt install vivaldi-stable case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) doInstall ;;
esac
Executable
+47
View File
@@ -0,0 +1,47 @@
#!/usr/bin/env bash
##makedesc: VSCode deb-package
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
download() {
if installed wget; then
wget -q --show-progress "$1" -O "$2"
else
curl -fsSL "$1" -o "$2"
fi
}
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install --cask visual-studio-code
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo
echo "==============================================="
echo "Installing VSCode"
echo "==============================================="
echo
mkdir -p "$HOME/install"
download "https://code.visualstudio.com/sha/download?build=stable&os=linux-deb-x64" \
"$HOME/install/vscode.deb"
sudo dpkg -i "$HOME/install/vscode.deb"
echo
echo "Finish!"
code --version
echo
}
case "$1" in
*) install ;;
esac
+47 -4
View File
@@ -1,14 +1,57 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install wine (latest) + ppa (focal) ##makedesc: Install wine (latest) + ppa
set -eo pipefail
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: wine on macOS requires Wine Skin, CrossOver, or manual setup" >&2
exit 1
fi
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing wine (latest)..." echo "Installing wine"
echo "===============================================" echo "==============================================="
echo echo
sudo dpkg --add-architecture i386 sudo dpkg --add-architecture i386
if installed wget; then
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 -y 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main' else
curl -fsSL https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
fi
sudo add-apt-repository -y "deb https://dl.winehq.org/wine-builds/ubuntu/ $(lsb_release -cs 2>/dev/null) main"
sudo apt install -y --autoremove winehq-stable sudo apt install -y --autoremove winehq-stable
echo
echo "Finish!"
wine --version wine --version
echo
}
remove() {
echo
echo "==============================================="
echo "Removing wine"
echo "==============================================="
echo
sudo apt remove --purge -y "wine*"
rm -rf "$HOME/.wine"
rm -f "$HOME/.config/menus/applications-merged/"*wine*
rm -rf "$HOME/.local/share/applications/wine"
rm -f "$HOME/.local/share/desktop-directories/"*wine*
rm -f "$HOME/.local/share/icons/"*wine*
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
+55 -9
View File
@@ -1,13 +1,59 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install youtube-dl ##makedesc: Install youtube-dl (src)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
echo
echo "==============================================="
echo "Installing youtube-dl"
echo "==============================================="
echo
# https://github.com/ytdl-org/youtube-dl#installation # https://github.com/ytdl-org/youtube-dl#installation
echo if ! installed make; then
echo "===============================================" if [ "$(uname -s)" = "Darwin" ]; then
echo "Installing youtube-dl..." echo "ERROR: Install Xcode Command Line Tools first." >&2
echo "===============================================" exit 1
echo else
sudo apt install -y make
fi
fi
mkdir -p "$HOME/install/youtube-dl" "$HOME/.local/bin"
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o "${HOME}/.local/bin/youtube-dl" if installed git; then
sudo chmod +rx "${HOME}/.local/bin/youtube-dl" if [ -d "$HOME/install/youtube-dl" ]; then
cd "$HOME/install/youtube-dl"
git pull
else
git clone https://github.com/ytdl-org/youtube-dl.git "$HOME/install/youtube-dl" --depth=1 --single-branch
fi
else
if ! installed wget; then
if [ "$(uname -s)" = "Darwin" ]; then
echo "ERROR: Install wget or use git." >&2
exit 1
else
sudo apt install -y wget
fi
fi
wget -q --show-progress 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
}
case "$1" in
*) install ;;
esac
+22 -10
View File
@@ -1,15 +1,27 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install ytdlcue ##makedesc: Install ytdlcue
set -eo pipefail
install() {
echo
echo "==============================================="
echo "Installing ytdlcue"
echo "==============================================="
echo
# https://gist.github.com/anthonyaxenov/8e11f18493c8419ee7abc94a8ea0cfaf # 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 )" install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
tools_dir="`dirname $install_dir`/tools" tools_dir="$(dirname "$install_dir")/tools"
cp "${tools_dir}/ytdlcue.sh" "${HOME}/.local/bin/ytdlcue" cp "${tools_dir}/ytdlcue.sh" "$HOME/.local/bin/ytdlcue"
sudo chmod +rx "${HOME}/.local/bin/ytdlcue" chmod +rx "$HOME/.local/bin/ytdlcue"
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+30 -16
View File
@@ -1,9 +1,24 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install zint (latest) ##makedesc: Install zint (latest)
set -eo pipefail
installed() { command -v "$1" >/dev/null 2>&1; }
install() {
if [ "$(uname -s)" = "Darwin" ]; then
if installed brew; then
brew install zint
else
echo "ERROR: Install Homebrew first." >&2
exit 1
fi
return
fi
echo echo
echo "===============================================" echo "==============================================="
echo "Installing zint (latest)..." echo "Installing zint"
echo "===============================================" echo "==============================================="
echo echo
@@ -15,23 +30,22 @@ sudo apt install -y --autoremove \
libpng-dev libpng-dev
if installed git; then if installed git; then
# 2.9.* =============================================================================== sudo rm -rf /usr/src/zint
sudo git clone git@github.com:zint/zint.git /usr/src/zint sudo git clone https://github.com/zint/zint.git /usr/src/zint
cd /usr/src/zint cd /usr/src/zint
sudo cmake . sudo cmake .
sudo make sudo make
sudo make install sudo make install
else else
echo "You need git to be installed!" echo "ERROR: You need git to be installed!" >&2
# 2.4.2 =============================================================================== exit 1
# https://wayneoutthere.com/2021/02/17/how-to-install-zint-on-ubuntu/
# sudo wget https://github.com/downloads/zint/zint/zint-2.4.2.tar.gz -O /usr/src/zint.tar.gz
# sudo tar -C /usr/src/ -xzf /usr/src/zint.tar.gz
# sudo rm -rf /usr/src/zint.tar.gz
# cd /usr/src/zint-2.4.2/build
# sudo cmake ..
# sudo make
# sudo make install
# sudo rm -rf /usr/src/zint*
# cd -
fi fi
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
+15 -3
View File
@@ -1,11 +1,23 @@
#!/bin/bash #!/usr/bin/env bash
##makedesc: Install vanilla zsh ##makedesc: Install vanilla zsh
set -eo pipefail
install() {
echo echo
echo "===============================================" echo "==============================================="
echo "Installing vanilla zsh..." echo "Installing vanilla zsh"
echo "===============================================" echo "==============================================="
echo echo
sudo apt install -y --autoremove zsh sudo apt install -y --autoremove zsh
echo "source ~/.profile" >> ~/.zshrc echo "source ~/.profile" >> "$HOME/.zshrc"
echo
echo "Finish!"
echo
}
case "$1" in
*) install ;;
esac
-2
View File
@@ -1,2 +0,0 @@
# [PACK] php + composer
composer: php composer-clean
-2
View File
@@ -1,2 +0,0 @@
# [TODO] [PACK] qt5 + flameshot from source
flameshot: qt5 flameshot-build
+2 -2
View File
@@ -1,2 +1,2 @@
# [PACK] Apache + php + mariadb ##lamp: [PACK] Apache + php + mariadb
lamp: apache php mariadb lamp: apache phpstack mariadb
+1 -1
View File
@@ -1,2 +1,2 @@
# [PACK] OBS Studio + droidcam-obs ##obs: [PACK] Install OBS Studio + droidcam-obs
obs: obs-studio droidcam-obs obs: obs-studio droidcam-obs
+1 -1
View File
@@ -1,4 +1,4 @@
# [PACK] zsh + omz + powerline10k + MesloLGS font ##omz: [PACK] zsh + omz + powerline10k + MesloLGS font
omz: zsh omz-clean omz-fancy omz: zsh omz-clean omz-fancy
chsh -s /usr/bin/zsh chsh -s /usr/bin/zsh
@exec zsh @exec zsh
+2
View File
@@ -0,0 +1,2 @@
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, phpmd)
phptools: composer php-psalm phpcs phpmd phpstan phpunit
+2
View File
@@ -0,0 +1,2 @@
##phpstack: [PACK] Install full php stack with tooling
phpstack: php phptools
-4
View File
@@ -1,4 +0,0 @@
#!/bin/bash
# https://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
sudo modprobe v4l2loopback video_nr=2 card_label="OBS Virtual Camera"
-57
View File
@@ -1,57 +0,0 @@
#!/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
View File
@@ -1,108 +0,0 @@
#!/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
View File
@@ -1,7 +0,0 @@
#!/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
-54
View File
@@ -1,54 +0,0 @@
#!/bin/bash
#########################################################################
# #
# Set display resolution #
# #
# Author: Anthony Axenov (Антон Аксенов) #
# Version: 1.0 #
# License: WTFPL #
# #
#########################################################################
# #
# Using this script you can change your display resolution #
# to any one you need. Just adjust some vars below and run script #
# (chmod +x needed). #
# #
#########################################################################
# https://gist.github.com/anthonyaxenov/c16e1181d4b8a8644c57ec8a1f6cf21c
# Set display name to work with. You can get it via 'xrandr --listactivemonitors'
display="HDMI-2"
# Set width of this display in px
width=1600
# Set height of this display in px
height=900
# Sometimes cvt and gtf generates different modelines.
# You can play around and look which of them gives best result:
modeline=$(cvt ${width} ${height} | grep "Modeline")
# modeline=$(gtf ${width} ${height} 60 | grep "Modeline")
# Some important data needed to xrandr:
modename="${width}x${height}_my"
params=$(echo "$modeline" | sed "s|^\s*Modeline\s*\"[0-9x_.]*\"\s*||")
echo "Set resolution ${width}x${height} on display $display:"
echo "$modename $params"
# Simple logic:
# 1. Switch display to safe mode which always exists (I believe) to avoid errors
xrandr --output $display --mode 640x480
# 2. If display aready have our mode -- we must delete it to avoid errors
if $(xrandr | grep -q "$modename"); then
# 2.1. Detach mode from display
xrandr --delmode $display $modename
# 2.2. Remove mode itself
xrandr --rmmode $modename
fi
# 3. Create new mode with freshly generated parameters
xrandr --newmode $modename $params
# 4. Attach mode to our display
xrandr --addmode $display $modename
# 5. Switch display to this mode immidiately
xrandr --output $display --mode $modename
-93
View File
@@ -1,93 +0,0 @@
#!/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"
-21
View File
@@ -1,21 +0,0 @@
#!/bin/bash
##makedesc: Uninstall docker
echo
echo "==============================================="
echo "Uninstalling docker..."
echo "==============================================="
echo
# sudo apt remove -y docker docker-engine docker.io containerd runc
sudo apt remove -y \
containerd \
containerd.io \
docker \
docker-ce \
docker-ce-cli \
docker-compose \
docker-compose-plugin \
docker-engine \
docker.io \
runc
-23
View File
@@ -1,23 +0,0 @@
#!/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
View File
@@ -1,11 +0,0 @@
#!/bin/bash
##makedesc: Uninstall omz
echo
echo "==============================================="
echo "Uninstalling omz..."
echo "==============================================="
echo
bash $ZSH/tools/uninstall.sh
exec bash
-10
View File
@@ -1,10 +0,0 @@
#!/bin/bash
##makedesc: Upgrade omz
echo
echo "==============================================="
echo "Upgrading omz..."
echo "==============================================="
echo
bash $ZSH/tools/upgrade.sh