Compare commits

176 Commits

Author SHA1 Message Date
b2e78c43d1 wip4 2026-02-16 17:28:48 +08:00
d13a8a44d1 change-amd-driver added 2026-02-16 17:26:38 +08:00
edac0e49c4 ddns scripts updated 2026-02-16 17:25:18 +08:00
642522a01d frkn removed 2026-02-16 17:24:42 +08:00
daa8df5c77 fix postman icon in desktop file 2026-02-16 17:22:49 +08:00
c7449f4acb tools -> scripts 2025-11-14 10:44:57 +08:00
0493f18b18 Dotfiles moved to another repo: https://git.axenov.dev/anthony/dotfiles 2025-11-14 10:43:47 +08:00
b8ca9a8dad zshrc and xcompose 2025-11-03 21:21:31 +08:00
549b420df2 Добавлен vacuum 2025-10-30 06:00:39 +00:00
edf76874fc misc 2025-10-12 18:25:13 +08:00
95ad6b0c6a rustdesk 1.4.2 2025-10-12 18:24:30 +08:00
ff36975eb7 frkn deprecated 2025-07-10 23:46:19 +08:00
5ae19346d6 wine misc, albert removed 2025-07-09 00:15:25 +08:00
53ee621747 duckdns improved 2025-07-08 23:50:53 +08:00
dd339f2939 duckdns misc 2025-07-05 10:23:59 +08:00
e0fbdf852e duckdns 2025-07-02 13:29:40 +08:00
b5983ed308 sublime text 4200 2025-06-21 22:48:29 +08:00
f39af6d446 makefile 2025-06-18 19:51:07 +08:00
8fe3d112ba Merge branch 'master' of git.axenov.dev:anthony/shell 2025-06-18 19:50:45 +08:00
4c81bcea73 rustdesk flatpak + kde permission 2025-06-18 19:50:28 +08:00
5623d08d85 suld 2025-05-23 00:19:28 +08:00
0a369efe1b Merge branch 'master' of git.axenov.dev:anthony/shell 2025-05-21 20:26:41 +08:00
1640ebfb45 neovim + lazyvim 2025-05-21 20:26:23 +08:00
d2c561fc28 upgraded lite-xl 2025-05-19 00:30:08 +08:00
a920e48422 Revert "telebit misc"
This reverts commit abad965e9a.
2025-05-18 23:54:02 +08:00
0ed07de2d2 php misc 2025-05-18 23:27:42 +08:00
abad965e9a telebit misc 2025-05-18 23:27:19 +08:00
b5b0140e34 vscode repo 2025-05-14 23:42:02 +08:00
5d75b6f79e vivaldi repo + install 2025-05-14 23:41:50 +08:00
87fd722509 albert draft 2025-05-14 19:58:43 +08:00
eaacecd87a ulauncher update 2025-05-14 18:51:18 +08:00
4c57a180ac sublimetext update 2025-05-14 18:49:44 +08:00
96bd945ef2 disable-ipv6 2025-03-29 18:58:45 +08:00
49fd27d3be display-rotate 2025-03-29 18:56:46 +08:00
3c9f1d71cb flameshot build form src 2025-03-24 19:48:25 +08:00
3a226ed5bb git helpers misc 2025-03-24 19:47:30 +08:00
fe83b3eb25 readme update 2025-03-24 19:46:01 +08:00
a34dda20c7 uninstall wine 2025-03-24 17:21:08 +08:00
021db1064e ubuntu tools misc 2025-03-19 19:08:19 +08:00
b70b89433b Merge branch 'master' of git.axenov.dev:anthony/shell 2025-03-18 13:45:33 +08:00
8531543982 make-swapfile 2025-03-18 13:45:29 +08:00
e05b47ae52 ubuntu server scripts misc 2025-02-20 10:22:39 +08:00
e9a6f4ddda docker-volume-snapshot 2025-02-20 10:22:25 +08:00
cbb493b5c4 ClamAV (WIP) 2025-02-10 21:32:52 +08:00
31ddf3a6d2 notification helpers 2025-02-10 21:30:36 +08:00
47827282a9 free-space misc 2025-02-10 21:30:24 +08:00
16075cdd61 new links in readme 2025-02-08 13:25:52 +08:00
29e5c960de docker, network and others 2025-02-08 13:25:41 +08:00
526dade1f8 new help examples 2025-02-08 13:24:30 +08:00
66126167c8 io misc 2025-02-08 13:23:48 +08:00
3696cc06af new traps example 2025-02-08 13:23:32 +08:00
8da2059d1e basic.sh new functions 2025-02-08 13:19:16 +08:00
9da84a69f2 free-space misc 2025-02-08 12:10:23 +08:00
50bd28abe4 io misc 2025-02-05 18:58:42 +08:00
bbbc0de694 arg() снова исправлен вызов tr 2025-01-29 19:50:52 +08:00
9258398be4 Merge branch 'master' of git.axenov.dev:anthony/shell 2025-01-27 15:10:30 +08:00
a60374033c arg() исправлен вызов tr 2025-01-27 15:10:18 +08:00
bcae2fb4cf dotfiles misc 2025-01-21 00:06:37 +08:00
c808cce9cd sublime text dotfiles 2025-01-21 00:05:57 +08:00
bacd71304a Merge branch 'master' of git.axenov.dev:anthony/shell 2025-01-20 16:11:56 +08:00
6fee688968 arg-parser -- fix utf8 2025-01-20 16:11:46 +08:00
ebd30c8a50 youtube-dl misc 2025-01-18 00:46:27 +08:00
c4b2af8073 new shebangs 2025-01-17 19:07:28 +08:00
45499ca5df args-parser refactor 2025-01-17 19:07:08 +08:00
53d5a31a30 many io misc useful updates 2025-01-16 14:23:46 +08:00
1e0d54f5d6 some basic helpers 2025-01-16 14:23:19 +08:00
5d3004c87b docker helpers 2025-01-16 13:39:16 +08:00
14f3f2caf2 arg-parser fixes 2025-01-16 13:39:02 +08:00
dc03b5f577 sublime merge 2102 + misc 2025-01-09 15:38:31 +08:00
2af5282e64 st4 4189 2024-12-26 00:49:56 +08:00
e2c0d1de87 wip 2024-12-02 16:12:18 +08:00
7bb8a8c839 Merge branch 'master' of git.axenov.dev:anthony/my-env 2024-11-24 14:47:02 +08:00
bc139e5cc5 st4 upgrade 2024-11-24 14:46:56 +08:00
beeb59b1aa vscode fix 2024-11-22 14:43:22 +08:00
3249c32cb2 Merge branch 'master' of git.axenov.dev:anthony/my-env 2024-11-22 14:38:43 +08:00
c18f014119 golang 1.23.0 2024-11-22 14:38:38 +08:00
d41f6505b9 todo list 2024-11-22 09:41:16 +08:00
c4c7d298e0 vscode deb 2024-11-22 09:41:05 +08:00
e95ccf042b lazynvim WIP 2024-11-22 09:32:36 +08:00
1a912bf645 frkn tool -- toggle ipv6 on (dis)connect 2024-11-22 09:32:22 +08:00
1c2abec8a7 Helpers fixes 2024-11-22 09:31:53 +08:00
a71b682f49 free-space tool 2024-09-08 11:33:09 +08:00
df826ba9c9 Update command for FRKN tool 2024-09-06 01:12:49 +08:00
737da43522 Updated frkn tool 2024-08-27 14:40:29 +08:00
890f09b82b frkn tool script for quick connection control 2024-08-26 16:22:03 +08:00
4b1bd30170 frkn 2024-08-02 00:03:57 +08:00
5842b954e3 sublime text 4169 2024-08-01 00:05:38 +08:00
a52ce34748 makefile 2024-07-31 23:40:56 +08:00
024b3311e0 uninstall scripts 2024-07-31 23:40:43 +08:00
22d12fd902 tools/ignore-veth.sh 2024-07-31 23:37:57 +08:00
def4f6761a dotfiles misc 2024-07-31 23:37:18 +08:00
ed10ab05d4 misc 2024-07-31 23:36:46 +08:00
b6817506e0 telegram misc 2024-07-31 23:36:15 +08:00
479ac2064f postman rework 2024-07-31 23:36:02 +08:00
4014f83402 php tools misc 2024-07-31 23:35:38 +08:00
bf970f58cd pgsql rework 2024-07-31 23:32:46 +08:00
7159850e83 papirus rework 2024-07-31 23:31:16 +08:00
3ef8692684 openvpn rework 2024-07-31 23:29:58 +08:00
efa60f5231 kde-backports misc 2024-07-31 23:29:37 +08:00
ee8cbd0fe4 jbmono misc 2024-07-31 23:27:06 +08:00
3c87f837eb grubc rename 2024-07-31 23:26:44 +08:00
6d7719d568 golang rework 2024-07-31 23:26:27 +08:00
e9638e845c git rework 2024-07-31 23:26:12 +08:00
b2cf7c154e flameshot 2024-07-31 23:25:51 +08:00
b988524c2d droidcam rework 2024-07-31 23:25:11 +08:00
a73a442f07 docker rework 2024-07-31 23:24:10 +08:00
f9f8f5b2dc composer reworked 2024-07-31 23:23:55 +08:00
79db21f336 chrome misc 2024-07-31 23:23:33 +08:00
bb78d67565 canon-mg2500 misc 2024-07-31 23:23:19 +08:00
8b9aecc754 apt misc 2024-07-31 23:18:15 +08:00
f3f6e8fd31 apache misc 2024-07-31 23:15:48 +08:00
5bf67b1c8e helpers misc 2024-07-31 23:14:53 +08:00
9baedd438f Обновить dotfiles/etc/docker/daemon.json 2024-06-03 10:51:58 +00:00
49595c7df5 docker mirrors 2024-05-31 00:13:37 +08:00
8ad20ca7fd apache2 + helpers 2023-04-12 22:11:17 +08:00
7cc6888cca Merge branch 'master' of git.axenov.dev:anthony/my-env 2023-04-12 21:50:46 +08:00
19d9f17f77 testing new helper functions in jbmono 2023-04-12 19:06:42 +08:00
86c7c92ae0 fixes in makefile generation 2023-04-12 19:05:12 +08:00
4670ee9b57 makefile updated 2023-04-12 17:03:00 +08:00
c261d62b36 new jetbrains mono fonts installer 2023-04-12 17:00:41 +08:00
acc7907a72 fix-obs-vcam revamped 2023-04-12 16:47:46 +08:00
ba9c1bf28d git_aliases 2023-04-12 08:57:04 +08:00
7fcf9ad9e6 corrected kde-backports 2023-04-11 23:49:00 +08:00
84822bd7fa papirus speedup 2023-04-11 23:48:36 +08:00
99ffbf68f8 minus sqlitebrowser from apt 2023-04-11 23:48:24 +08:00
a5388f5127 telegram from official website 2023-04-11 23:47:43 +08:00
3339928940 youtube-dl from sources 2023-04-11 23:45:41 +08:00
bc0a2e4426 some finish messages 2023-04-11 23:43:14 +08:00
805716e9b4 youtube-dl wget without sudo 2023-04-11 14:51:36 +00:00
be8d9ab4a6 rustdesk fix 2023-03-10 13:55:26 +08:00
3bb7ec3564 php fixes 2023-03-10 13:55:10 +08:00
01896666f2 Merge branch 'master' of git.axenov.dev:anthony/my-env 2023-02-01 22:30:10 +08:00
aaec3096f9 vivaldi uninstall 2023-02-01 22:29:23 +08:00
46ca617c1a docker misc 2023-02-01 22:29:02 +08:00
90dc1b4d8b Revert "Descriptions parsing improved" (c1150af9) + php tools fixes 2022-12-28 15:20:25 +08:00
f89b2d946d nodejs (nvm/npm) rework 2022-12-21 22:07:05 +08:00
0aac460d63 makefile misc + generator 2022-12-11 14:48:52 +08:00
aab50b0401 php refactored and new tools 2022-12-11 14:48:30 +08:00
28692bfcf5 unzip -oq 2022-12-11 14:32:18 +08:00
2d2380fd62 open sans 2022-12-10 22:13:09 +08:00
f20a161373 Merge branch 'master' of git.axenov.dev:anthony/my-env 2022-12-10 21:59:53 +08:00
3a853564c1 phptools 2022-12-10 21:59:01 +08:00
5abc1c9434 papirus misc 2022-12-10 21:58:53 +08:00
7136fac018 dots misc 2022-12-10 21:58:38 +08:00
7554e57ea4 Merge branch 'master' of git.axenov.dev:anthony/my-env 2022-11-30 17:51:34 +08:00
e6411438c5 openvpn 2022-11-30 17:51:28 +08:00
e86281c967 git_aliases misc 2022-11-30 17:51:21 +08:00
04c74e1d00 dotfiles misc 2022-11-20 21:38:49 +08:00
5f2d2e2011 apt misc 2022-11-20 21:38:40 +08:00
8f2b1fa137 lite-xl misc 2022-11-20 21:37:11 +08:00
14e841cc80 rustdesk updated 2022-11-03 22:49:31 +08:00
6d7460c5b0 lite-xl 2.1.0 2022-11-03 22:49:09 +08:00
d262e8f202 Canon -y 2022-10-12 15:55:45 +08:00
27659f8ad5 xclip 2022-10-10 23:01:10 +08:00
0aec6382bd ytdlcue fixes 2022-10-09 13:23:20 +08:00
4223f7845d tools a+x 2022-10-09 13:16:23 +08:00
accce0dddb ytdlcue + ytm misc 2022-10-09 12:58:49 +08:00
292e15199c ytm misc 2022-10-08 22:40:39 +08:00
acacd1657c +apt ffmpeg 2022-10-08 22:15:33 +08:00
3c527a8dee ytm misc 2022-10-08 22:14:59 +08:00
0e90625d7c Fix for Rutracker's blocked trackers in RF 2022-10-08 21:50:39 +08:00
afbb634566 Some new bash aliases 2022-10-08 21:49:43 +08:00
bc9eb794a8 Dotfiles installer 2022-10-08 12:37:00 +08:00
4637b069f9 youtube-dl 2022-10-05 11:30:31 +08:00
05e6b8195b vivaldi 2022-10-04 13:11:37 +08:00
8c6a191d61 kde-portal 2022-10-04 13:11:25 +08:00
b7856f6529 inotifywait-cp.sh improved 2022-10-01 13:17:59 +08:00
3e3c03a2e1 Fixes 'ln -s' 2022-10-01 12:09:57 +08:00
155352f8ad snap misc 2022-10-01 12:09:45 +08:00
14362f6165 gen-makefile is back 2022-09-30 15:48:27 +08:00
8b809bafca Dockerfile removed, README fixes 2022-09-30 15:46:34 +08:00
40d214e99b Merge branch 'master' of git.axenov.dev:anthony/my-env 2022-09-30 14:06:23 +08:00
e4e64a8ab1 obs pack and fixes 2022-09-30 14:06:16 +08:00
8de641fd68 Big update of git aliases (may be a lot of useless trash) 2022-09-30 12:42:52 +08:00
32bdf4b44d inotify-tools 2022-09-29 13:33:57 +08:00
d7d27849a1 fix-obs-vcam 2022-09-29 13:31:34 +08:00
170 changed files with 5464 additions and 1124 deletions

View File

@@ -1,4 +0,0 @@
.git
.gitignore
.dockerignore
README.md

View File

@@ -1,27 +0,0 @@
FROM ubuntu:22.04
RUN apt update && \
apt -y install \
apt-transport-https \
apt-utils \
bsdmainutils \
curl \
dialog \
grep \
make \
man \
sudo \
wget
RUN adduser ivan \
--quiet \
--home=/home/ivan \
--ingroup=sudo \
--disabled-password \
--disabled-login
COPY ./ /home/ivan/my-env
RUN echo "ivan ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER ivan
WORKDIR /home/ivan/my-env

286
Makefile
View File

@@ -1,173 +1,269 @@
# Autogenerated at 29.09.2022 12:27 using ./gen-makefile
# Autogenerated at 10.07.2025 23:45 using ./gen-makefile
.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] zsh + omz + powerline10k + MesloLGS font
omz: zsh omz-clean omz-fancy
chsh -s /usr/bin/zsh
@exec zsh
#===============================================
# Scripts listed in ./install
#===============================================
# Install apache2 (latest)
apache:
@./install/apache
##apache2: Install apache2 (latest)
apache2:
@./install/apache2
# Install bunch of software from apt
##apt: Install software from apt
apt:
@./install/apt
# Install Canon Pixma MG2500 + ppa
##canon-mg2500: Install Canon Pixma MG2500 + ppa
canon-mg2500:
@./install/canon-mg2500
# Install google chrome (latest)
##chrome: Install google chrome (latest)
chrome:
@./install/chrome
# Install composer (latest)
composer-clean:
@./install/composer-clean
##clamav: ClamAV (WIP)
clamav:
@./install/clamav
# Install docker (latest) + docker-compose (latest) + ppa
##composer: Install composer (latest)
composer:
@./install/composer
##docker: Install docker (latest) + ppa
docker:
@./install/docker
# Install droidcam v1.8.2
##dots: Install dotfiles
dots:
@./install/dots
##droidcam: Install droidcam v1.9.0
droidcam:
@./install/droidcam
# Install droidcam-obs plugin v1.5.1
##droidcam-obs: Install droidcam-obs plugin v1.5.1
droidcam-obs:
@./install/droidcam-obs
# [TODO] Build flameshot from src (latest)
flameshot-build:
@./install/flameshot-build
##flameshot: Install flameshot (latest)
flameshot:
@./install/flameshot
# Install git (latest)
##frkn.deprecated: Install Wireguard + FRKN
frkn.deprecated:
@./install/frkn.deprecated
##git: Install git (latest)
git:
@./install/git
# Install golang v1.18.3
##golang: Install golang v1.21.0
golang:
@./install/golang
# Install grub-customizer (latest) + ppa
grubc:
@./install/grubc
##grub-customizer: Install grub-customizer (latest + ppa)
grub-customizer:
@./install/grub-customizer
# Install KDE Window AppMenu Applet
##jbmono: Install JetBrains Mono fonts
jbmono:
@./install/jbmono
##kde-appmenu: Install KDE Window AppMenu Applet
kde-appmenu:
@./install/kde-appmenu
# Install KDE Backports + ppa
##kde-backports: Install KDE Backports
kde-backports:
@./install/kde-backports
# Install file templates (KDE)
##kde-file-templates: Install file templates (KDE)
kde-file-templates:
@./install/kde-file-templates
# Install libreoffice
##kde-portal: Install KDE portal
kde-portal:
@./install/kde-portal
##libreoffice: Install libreoffice
libreoffice:
@./install/libreoffice
# Install lite-xl v2.0.5 (draft)
##lite-xl: Install lite-xl v2.1.7
lite-xl:
@./install/lite-xl
# Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed)
##mariadb: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed)
mariadb:
@./install/mariadb
# Install nodejs + npm via nvm
##nodejs: Install nodejs + npm via nvm
nodejs:
@./install/nodejs
# Install ntfy (latest) + ppa
##ntfy: Install ntfy (latest) + ppa
ntfy:
@./install/ntfy
# Install omz (latest)
##nvim: Install nvim + lazyvim
nvim:
@./install/nvim
##obs-studio: Install obs-studio (latest snap)
obs-studio:
@./install/obs-studio
##omz-clean: Install omz (latest)
omz-clean:
@./install/omz-clean
# Install omz fancy (powerline10k + MesloLGS font)
##omz-fancy: Install omz fancy (powerline10k + MesloLGS font)
omz-fancy:
@./install/omz-fancy
# Install papirus-icon-theme (latest)
##openvpn: Install openvpn v2.6.3 (src)
openvpn:
@./install/openvpn
##papirus: Install papirus-icon-theme (latest)
papirus:
@./install/papirus
# Install postgresql (latest) and php-pgsql (if php is installed)
##pgsql: Install postgresql (latest) and php-pgsql (if php is installed)
pgsql:
@./install/pgsql
# Install php v8.1 + ppa
##php: Install php v8.4
php:
@./install/php
# Install postman (latest)
##phpcs: Install phpcs + php-cs-fixer
phpcs:
@./install/phpcs
##phpmd: Install phpmd
phpmd:
@./install/phpmd
##php-psalm: Install psalm
php-psalm:
@./install/php-psalm
##php-spx: Install php-spx
php-spx:
@./install/php-spx
##phpstan: Install phpstan
phpstan:
@./install/phpstan
##phpunit: Install phpunit
phpunit:
@./install/phpunit
##postman: Install postman (latest)
postman:
@./install/postman
# Install qt5
##qt5: Install qt5
qt5:
@./install/qt5
# Install rustdesk client v1.1.9 (deb)
##rustdesk: Install rustdesk client (flatpak)
rustdesk:
@./install/rustdesk
# Install bunch of software from snap
##rustdesk-deb: Install rustdesk client v1.4.0 (deb)
rustdesk-deb:
@./install/rustdesk-deb
##snap: Install bunch of software from snap
snap:
@./install/snap
# Install syncthing (latest) + ppa
##sublimemerge: Install Sublime Merge
sublimemerge:
@./install/sublimemerge
##sublimetext: Install Sublime Text
sublimetext:
@./install/sublimetext
##suld: Samsung Unified Linux Driver repo
suld:
@./install/suld
##syncthing: Install syncthing (latest) + ppa
syncthing:
@./install/syncthing
# Install telebit (latest)
##telebit: Install telebit (latest)
telebit:
@./install/telebit
# Install ulauncher (latest) + ppa
##telegram: Install telegram (latest)
telegram:
@./install/telegram
##ulauncher: Install ulauncher (latest) + ppa
ulauncher:
@./install/ulauncher
# Install wine (latest) + ppa (focal)
##vivaldi: Install Vivaldi + ppa
vivaldi:
@./install/vivaldi
##vscode: VSCode deb-package
vscode:
@./install/vscode
##wine: Install wine (latest) + ppa
wine:
@./install/wine
# Install zint (latest)
##youtube-dl: Install youtube-dl (src)
youtube-dl:
@./install/youtube-dl
##ytdlcue: Install ytdlcue
ytdlcue:
@./install/ytdlcue
##zint: Install zint (latest)
zint:
@./install/zint
# Install vanilla zsh
##zsh: Install vanilla zsh
zsh:
@./install/zsh
#===============================================
# Scripts listed in ./packs
#===============================================
##lamp: [PACK] Apache + php + mariadb
lamp: apache phpstack mariadb
##obs: [PACK] Install OBS Studio + droidcam-obs
obs: obs-studio droidcam-obs
##omz: [PACK] zsh + omz + powerline10k + MesloLGS font
omz: zsh omz-clean omz-fancy
chsh -s /usr/bin/zsh
@exec zsh
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, phpmd)
phptools: composer php-psalm phpcs phpmd phpstan phpunit
##phpstack: [PACK] Install full php stack with tooling
phpstack: php phptools
#===============================================
# Scripts listed in ./upgrade
#===============================================
# Upgrade omz
##^omz: Upgrade omz
^omz:
@./upgrade/omz
@@ -175,27 +271,77 @@ zsh:
# Scripts listed in ./uninstall
#===============================================
# Uninstall docker
##/apache2: Uninstall apache2
/apache2:
@./uninstall/apache2
##/canon-mg2500: Uninstall Canon Pixma MG2500 + ppa
/canon-mg2500:
@./uninstall/canon-mg2500
##/chrome: Uninstall google chrome
/chrome:
@./uninstall/chrome
##/composer: Uninstall composer
/composer:
@./uninstall/composer
##/docker: Uninstall docker + ppa
/docker:
@./uninstall/docker
# Uninstall omz
##/grub-customizer: Uninstall grub-customizer with ppa
/grub-customizer:
@./uninstall/grub-customizer
##/lazynvim: <no description>
/lazynvim:
@./uninstall/lazynvim
##/lite-xl: Uninstall lite-xl
/lite-xl:
@./uninstall/lite-xl
##/omz: Uninstall omz
/omz:
@./uninstall/omz
##/sublimemerge: Uninstall Sublime Merge
/sublimemerge:
@./uninstall/sublimemerge
##/sublimetext: Uninstall Sublime Text
/sublimetext:
@./uninstall/sublimetext
##/vivaldi: Uninstall vivaldi + ppa
/vivaldi:
@./uninstall/vivaldi
##/wine: Uninstall wine
/wine:
@./uninstall/wine
#===============================================
# Service goals
#===============================================
self:
@./gen-makefile
help: Makefile
@echo "Ubuntu software installator"
@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 "\tmake @docker docker"
@echo "\tmake php @docker ^omz"
@echo "\tmake /docker docker"
@echo "\tmake php /docker ^omz"
@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

106
README.md
View File

@@ -1,46 +1,28 @@
# 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
* 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)
* `wget` (necessary for some scripts)
* `git` (necessary for some scripts)
* `wget` (required 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 dependecies are missed for some of these scripts it is enougth to run `./install/apt` in most cases, otherwise script will suggest (or even install) them.
## Usage
### Clone this repo (recommended)
```shell
# if git is installed
git clone git@git.axenov.dev:anthony/my-env.git --depth=1
# with git
git clone git@git.axenov.dev:anthony/shell.git --depth=1 --single-branch
# if git is not installed
wget -qO - https://git.axenov.dev/anthony/my-env/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
# without git
wget -qO - https://git.axenov.dev/anthony/shell/archive/master.tar.gz | tar -zxf -
# get full list of `make` goals
make
```
### Selective straightforward installation
```shell
# from remote file
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt | bash
# from locally cloned repo
./install/apt
cd shell && make
```
## How to add my script?
@@ -48,7 +30,7 @@ wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt |
1. Create a new shell script in `./install`, `./upgrade` or `./uninstall` directory.
At the beggining of a file you must write these two lines:
```shell
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Your description for Makefile
```
2. Make this script executable, e.g.:
@@ -58,18 +40,19 @@ wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt |
3. Test your script
4. Run `make self` to generate new `./Makefile`
## How to create packs?
## How to create a pack?
You can create new file inside `./packs` dir.
Syntax is same as classic makefile with one important and necessary addition -- a comment started with `##`:
Syntax is same as classic makefile.
It is important to add a comment with short description:
```makefile
# Pack description
##mypack1: Pack description
mypack1: goal1 goal2 goalX ...
...
# Pack description
##mypackX: Pack description
mypackX: goalA goalB
@cp file1 file2
...
@@ -77,38 +60,35 @@ mypackX: goalA goalB
```
where:
* `mypack*` is the pack name
* `mypack*` is the pack name of your choice
* `goal*` are script names in `./install`
## Testing in docker (not recommended)
## Useful links and sources used
> Note that this is almost useless way to test since you'll meet errors in many cases because dockerized OS is not fully-functional and will never be.
>
> You can use docker to test something **really simple**, e.g. to check general script steps or install cli tools.
>
> In other cases you need virtualized Ubuntu instead of dockerized one, so I strongly recommend you to use [VirtualBox](https://www.virtualbox.org/wiki/Downloads) or your host machine.
```shell
# switch to repo dir
cd my-env
# build and run container
docker build -t myenv . && docker run -it myenv
# or oneliner
docker run -it $(docker build -q .)
```
Now you can play around with scripts.
## TODO
* build: [flameshot](https://github.com/flameshot-org/flameshot#compilation)
* build: [rustdesk](https://github.com/rustdesk/rustdesk#build)
* [JB mono](https://www.jetbrains.com/ru-ru/lp/mono/#how-to-install) ([2](https://fonts.google.com/specimen/JetBrains+Mono))
* update scripts (when possible)
* uninstall scripts (when possible)
* https://gist.github.com/anthonyaxenov/d53c4385b7d1466e0affeb56388b1005
* https://gist.github.com/anthonyaxenov/89c99e09ddb195985707e2b24a57257d
* ...and other my [gists](https://gist.github.com/anthonyaxenov/) with [SHELL] prefix
* https://github.com/nvie/gitflow/blob/develop/gitflow-common (BSD License)
* 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
[WTFPLv2](LICENSE)
[WTFPLv2](LICENSE) but other licences are also possible.

11
TODO.md Normal file
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)
* ...

View File

@@ -1,131 +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 ..='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 wine='LANG=ru_RU.utf8 wine'
alias docker.prune='docker image prune -f; docker network prune -f; docker container prune -f'
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
# }

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

View File

@@ -1,275 +0,0 @@
[alias]
#-----------------------------------------------------------------
a = add
aa = add --all
#-----------------------------------------------------------------
b = branch
bm = branch --merged
bnm = branch --no-merged
bv = branch -v
bvv = branch -vv
#-----------------------------------------------------------------
c = commit
ci = commit --interactive
ca = commit --all
cm = commit --message
cam = commit --all --message
amend = commit --amend --all --no-edit
amendm = commit --amend --all --message
# https://words.filippo.io/git-fixup-amending-an-older-commit/
cf = "!f() { TARGET=$(git rev-parse \"$1\"); git commit --fixup=$TARGET && GIT_EDITOR=true git rebase --interactive --autosquash $TARGET~; }; f"
#-----------------------------------------------------------------
co = checkout
cog = checkout --guess
cob = checkout -b
#-----------------------------------------------------------------
cp = cherry-pick
cpa = cherry-pick --abort
cpc = cherry-pick --continue
cpn = cherry-pick --no-commit
# cpnx = cherry-pick --no-commit -x
#-----------------------------------------------------------------
d = diff
dw = diff --word-diff
dc = diff --cached
ds = diff --staged
dwc = diff --word-diff --cached
dws = diff --word-diff --staged
#-----------------------------------------------------------------
f = fetch
fa = fetch --all
#-----------------------------------------------------------------
# g = grep
#-----------------------------------------------------------------
l = log
lo = log --oneline
#-----------------------------------------------------------------
m = merge
ma = merge --abort
mc = merge --continue
mn = merge --no-commit
#-----------------------------------------------------------------
o = checkout
#-----------------------------------------------------------------
p = pull --recurse-submodules
clone = clone --recursive
#-----------------------------------------------------------------
r = remote
rv = remote -v
ra = remote add
ru = remote update
rs = remote show
rso = remote show origin
rp = remote prune
rpo = remote prune origin
rpd = remote prune --dry-run
rpod = remote prune origin --dry-run
#-----------------------------------------------------------------
rv = revert
rvn = revert --no-commit
#-----------------------------------------------------------------
rb = rebase
rba = rebase --abort
rbc = rebase --continue
rbs = rebase --skip
rbi = rebase --interactive
#-----------------------------------------------------------------
s = status
#-----------------------------------------------------------------
sb = show-branch
#-----------------------------------------------------------------
sub = submodule
# si = submodule init
# sdi = submodule deinit -f
# sa = submodule add
# sup = submodule update
# sst = submodule status
# ss = submodule summary
#-----------------------------------------------------------------
master = "!git checkout master && git pull"
main = "!git checkout main && git pull"
dev = "!git checkout dev && git pull"
develop = "!git checkout develop && git pull"
#-----------------------------------------------------------------
user = config --local --get-regexp '^user' # локальные настройки пользователя git
guser = config --global --get-regexp '^user' # глобальные настройки пользователя git
# whoami = user
# gwhoami = guser
#-----------------------------------------------------------------
contributors = shortlog --summary --numbered --no-merges
archive = !"f() { top=$(rev-parse --show-toplevel); cd $top; tar cvf $top.tar $top ; }; f"
default-branch = config init.defaultBranch
panic = "!git checkout $(git default-branch) && git fetch origin --prune && git reset --hard origin/$(git default-branch) && git clean -ffd"
uncommit = reset --soft HEAD~1
unadd = reset HEAD
discard = checkout --
cleaner = clean -dff
cleanest = clean -dffx
cleanout = !git clean -df && git checkout -- .
publish = "!git push --set-upstream origin $(git current-branch)"
inbound = "!git remote update --prune; git log ..@{upstream}"
outbound = log @{upstream}..
aliases = "!git config --get-regexp '^alias\\.' | cut -c 7- | sed 's/ / = /'"
branches = branch -a
tags = tag -n1 --list
stashes = stash list
current-branch = git branch --show-current #rev-parse --abbrev-ref HEAD
upstream-branch = !git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)
exec = "!exec"
pruner = "!git prune --expire=now; git reflog expire --expire-unreachable=now --rewrite --all"
repacker = repack -a -d -f --depth=300 --window=300 --window-memory=1g
optimizer = "!git pruner; git repacker; git prune-packed"
last-tag = describe --tags --abbrev=0
last-tagged = "!git describe --tags $(git rev-list --tags --max-count=1)"
orphans = fsck --full
log-my = "!git log --author $(git config user.email)"
log-compact1 = log --graph --topo-order --date=short --abbrev-commit --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %Cblue%G?%Creset'
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"
# # общее -----------------------------------------------------------------
# init = init -q # no blm!
# aliases = config --get-regexp '^alias' # показать список доступных алиасов
# user = config --local --get-regexp '^user' # локальные настройки пользователя git
# guser = config --global --get-regexp '^user' # глобальные настройки пользователя git
# user-me = "git config user.name 'Anthony Axenov'; git config user.email 'anthonyaxenov@gmail.com'; git config user.signingkey 'F7CCD4EC'"
# user-bars = "git config user.name 'Антон Аксенов'; git config user.email 'a.aksenov@bars.group'; git config user.signingkey '45C3E670'"
# # ветки -------------------------------------------------------------------
# bheads = branch -vv # ветки и их последние коммиты
# branches = branch --list -vv # показать текущую ветку в общем списке локальных веток
# # br = status -sb # показать название текущей ветки
# brd = branch -D # удалить ветку локально
# brod = "!git branch -D "$1"; git push origin :"$1";" # удалить ветку локально и на origin
# merged = branch --merged # показать список веток, слитых в текущую
# #ghpr = "!git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1" # github: встать на PR с указанным id
# # удалить локальные ветки, слитые в текущую:
# trim = "!DEFAULT=master; git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; git remote prune origin;"
# # переключение ------------------------------------------------------------
# co = checkout # переключиться на ветку/тег/коммит
# cob = checkout -b # создание новое ветки
# master = "!git checkout master && git pull" # переключиться на ветку master и обновить
# dev = "!git checkout dev && git pull" # переключиться на ветку dev и обновить
# develop = "!git checkout develop && git pull" # переключиться на ветку develop и обновить
# # фиксация изменений ------------------------------------------------------
# c = commit # коммит
# ca = commit -a # коммит всех файлов
# cm = commit -m # коммит с заданным сообщением
# cam = commit -am # коммит всех файлов с заданным сообщением
# amend = commit --amend --no-edit -a # прикрепляет все индексированные файлы к последнему коммиту, используя уже существующее сообщение
# #amenda = commit --amend --no-edit
# amendm = commit --amend -m # прикрепляет все индексированные файлы к последнему коммиту, спрашивает новое сообщение к коммиту
# cp = cherry-pick # применить коммит поверх текущего HEAD
# diffc = diff --cached # показать дельту staged-файла
# # управление изменениями, сброс состояний, откат --------------------------
# # st = status -sb # короткий status
# st = status # сокращение
# rh = reset --hard # откат коммита с удалением всех изменений на указанный коммит
# rhh = reset --hard HEAD # откат коммита с удалением всех изменений на последний коммит
# rmh = reset --mixed HEAD # откат коммита с сохранением всех изменений
# unstage = reset HEAD # переводит файл staged => unstaged без потери изменений
# clear = checkout -- # удаляет изменения в файле
# # алиасы для временной фиксации
# # на самом деле, для таких дел надо использовать git stash
# # save = !git add -A && git commit -m 'SAVEPOINT'
# wip = commit -am "WIP"
# wipa = commit --amend -am "WIP"
# undo = reset --mixed HEAD~
# # работа с remote-репами --------------------------------------------------
# pushf = push --force # отправить ветку принудительно
# pusht = push --tags # отправить теги
# pushft = push --tags --force # отправить теги принудительно
# pullf = pull --force # получить ветку принудительно
# pullt = pull --tags # получить теги
# pullft = pull --tags --force # получить теги
# ploh = pull origin HEAD # получить текущую ветку из origin
# remotes = remote -v # показать список удалённых репозиториев
# #sy = remote update origin --prune #
# rso = remote show origin # показать состояние локальных веток относительно удалённых на origin bare
# rpo = remote prune origin # удалить все мёртвые ссылки на bare-ветки origin
# repush = 'git push origin :$1 && git push origin $1' # замена push --force
# # просмотр логов ----------------------------------------------------------
# head = log -1 HEAD # показать последний коммит в текущей ветке
# heads = log --graph --decorate --simplify-by-decoration --oneline # коммиты, которыми оканчиваются ветки
# # название текущей ветки или тега при detached head:
# dehead = "!BR=$(git branch --show-current); if [ -n \"$BR\" ]; then echo $BR; else git describe --contains --all HEAD; fi;"
# tree = log --graph --pretty=format:'%C(yellow)%h%C(cyan)%d%Creset %s %C(white)- %an, %ar%Creset'
# hist = log --pretty=format:\"%h | %an (%ad) %s%d\" --graph --date=relative
# logfull = log --graph --decorate --all
# grog = 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'
# # сабмодули ---------------------------------------------------------------

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
dotfiles/.gitignore vendored
View File

@@ -1,4 +0,0 @@
.DS_Store
Desktop.ini
._*
Thumbs.db

View File

View File

@@ -1,2 +0,0 @@
This directory contains files whose names start with a dot.
Make sure your file manager displays them here.

View File

@@ -1,12 +1,28 @@
#!/bin/bash
mv Makefile Makefile.bak
#!/usr/bin/env bash
[ -f Makefile ] && mv Makefile Makefile.bak
CHR_UPGRADE='^'
CHR_UNINSTALL='/'
cat << EOF >> Makefile
cat << EOF > Makefile
# Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]}
.DEFAULT_GOAL := help
#===============================================
# Scripts listed in ./install
#===============================================
EOF
for file in ./install/*; do
name=${file##*/}
name=${name%.sh}
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
[ -z "$desc" ] && desc='<no description>'
echo -e "##${name}: ${desc}\n${name}:\n\t@${file} install\n" >> Makefile
done;
cat << EOF >> Makefile
#===============================================
# Scripts listed in ./packs
#===============================================
@@ -18,20 +34,6 @@ for file in ./packs/*; do
echo >> Makefile
done;
cat << EOF >> Makefile
#===============================================
# 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 "# ${desc}\n${name}:\n\t@${file}\n" >> Makefile
done;
cat << EOF >> Makefile
#===============================================
@@ -45,7 +47,7 @@ for file in ./upgrade/*; do
name=${name%.sh}
desc=$(grep -m 1 -oP "(?<=^##makedesc:\s).*$" ${file})
[ -z "$desc" ] && desc='<no description>'
echo -e "# ${desc}\n${CHR_UPGRADE}${name}:\n\t@${file}\n" >> Makefile
echo -e "##${CHR_UPGRADE}${name}: ${desc}\n${CHR_UPGRADE}${name}:\n\t@${file} upgrade\n" >> Makefile
done;
cat << EOF >> Makefile
@@ -60,7 +62,7 @@ for file in ./uninstall/*; do
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
echo -e "##${CHR_UNINSTALL}${name}: ${desc}\n${CHR_UNINSTALL}${name}:\n\t@${file} remove\n" >> Makefile
done;
cat << EOF >> Makefile
@@ -70,21 +72,22 @@ cat << EOF >> Makefile
self:
@./gen-makefile
help: Makefile
@echo "Ubuntu software installator"
@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 ${CHR_UPGRADE}GOAL|- upgrade software\n \
make ${CHR_UNINSTALL}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 ${CHR_UPGRADE}GOAL\t - upgrade software"
@echo "\tmake ${CHR_UNINSTALL}GOAL\t - uninstall software"
@echo "\nYou can combine GOALs, here are some examples:"
@echo "\tmake @docker docker"
@echo "\tmake php @docker ^omz"
@echo "\tmake ${CHR_UNINSTALL}docker docker"
@echo "\tmake php ${CHR_UNINSTALL}docker ${CHR_UPGRADE}omz"
@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
echo "New ./Makefile has been generated!"

20
helpers.sh Normal file
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
install/_example Normal file
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
install/anytype Executable file
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

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

46
install/apache2 Executable file
View File

@@ -0,0 +1,46 @@
#!/usr/bin/env bash
##makedesc: Manage apache2 (apt)
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

View File

@@ -1,16 +1,9 @@
#!/bin/bash
##makedesc: Install bunch of software from apt
echo
echo "==============================================="
echo "Installing software from apt..."
echo "==============================================="
echo
#!/usr/bin/env bash
##makedesc: Install basic software from apt
sudo apt update && \
sudo apt upgrade -y --autoremove
sudo apt install -y \
sudo apt upgrade -y --autoremove && \
sudo apt install -y \
alien \
apt-transport-https \
build-essential \
@@ -31,7 +24,6 @@ sudo apt install -y \
libghc-zlib-dev \
libssl-dev \
lsb-release \
lsp-plugins \
make \
mc \
meld \
@@ -40,17 +32,19 @@ sudo apt install -y \
net-tools \
nmap \
p7zip-full \
pulseeffects \
easyeffects \
software-properties-common \
sqlitebrowser \
terminator \
ubuntu-restricted-extras \
unzip \
vlc
# earlyoom \
# etckeeper \
# geoclue-2.0 \
# gnome-software \
# minder \
# redshift \
# redshift-gtk
vlc \
ffmpeg \
inotify-tools \
notify-osd \
fonts-open-sans \
libnotify-bin \
tree \
earlyoom
# terminator
# xclip
# sqlitebrowser
# etckeeper

View File

@@ -1,11 +1,52 @@
#!/bin/bash
##makedesc: Install Canon Pixma MG2500 + ppa
#!/usr/bin/env bash
##makedesc: Canon Pixma MG2500 + ppa
echo
echo "==============================================="
echo "Installing Canon Pixma MG2500 + ppa..."
echo "==============================================="
echo
install() {
echo
echo "==============================================="
echo "Installing Canon Pixma MG2500 + ppa"
echo "==============================================="
echo
sudo add-apt-repository -y ppa:thierry-f/fork-michael-gruz
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
}
sudo add-apt-repository -y ppa:thierry-f/fork-michael-gruz
sudo apt install cnijfilter-mg2500series scangearmp-mg2500series
upgrade() {
echo
echo "==============================================="
echo "Upgrading Canon Pixma MG2500 + ppa"
echo "==============================================="
echo
sudo apt upgrade -y cnijfilter-mg2500series scangearmp-mg2500series
echo
echo "Finish! Canon Pixma MG2500 + ppa"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing Canon Pixma MG2500 + ppa"
echo "==============================================="
echo
# sudo apt purge -y cnijfilter-mg2500series scangearmp-mg2500series
sudp dpkg -r cnijfilter-mg2500series
sudp dpkg -r cnijfilter-common
sudp dpkg -r scangearmp-mg2500series
sudp 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

View File

@@ -1,14 +1,56 @@
#!/bin/bash
##makedesc: Install google chrome (latest)
#!/usr/bin/env bash
##makedesc: Google Chrome (latest)
echo
echo "==============================================="
echo "Installing google chrome (latest)..."
echo "==============================================="
echo
set -eo pipefail
# 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 && \
sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb && \
rm /tmp/google-chrome-stable_current_amd64.deb
dest="$HOME/install/deb"
deb="$dest/google-chrome.deb"
url="https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
install() {
echo
echo "==============================================="
echo "Installing Google Chrome"
echo "==============================================="
echo
mkdir -p "$dest"
wget "$url" -O "$deb"
sudo dpkg -i "$deb"
echo
echo "Finish! $(google-chrome --version)"
echo
}
upgrade() {
echo
echo "==============================================="
echo "Upgrading Google Chrome"
echo "==============================================="
echo
mkdir -p "$dest"
wget "$url" -O "$deb"
sudo dpkg -i "$deb"
echo
echo "Finish! $(google-chrome --version)"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing Google Chrome"
echo "==============================================="
echo
sudo dpkg -r google-chrome
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac

56
install/clamav Executable file
View File

@@ -0,0 +1,56 @@
#!/usr/bin/env bash
##makedesc: ClamAV
set -eo pipefail
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

38
install/composer Executable file
View File

@@ -0,0 +1,38 @@
#!/usr/bin/env bash
##makedesc: Install composer (latest)
here=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
source "$here/../helpers.sh" || exit 255
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
title
require php
if installed composer; then
warn "WARNING: Removing current composer to install latest one"
composer --version
__AAA_NO_TITLE=1 source $here/../uninstall/composer
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}\""
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
export "$NEWPATH"
echo "export $NEWPATH" >> "$HOME/.profile"
}
source "$HOME/.profile"
success "composer installed!"
composer --version

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

View File

@@ -1,37 +1,78 @@
#!/bin/bash
##makedesc: Install docker (latest) + docker-compose (latest) + ppa
echo
echo "==============================================="
echo "Installing docker (latest)..."
echo "==============================================="
echo
#!/usr/bin/env bash
##makedesc: Docker + ppa
# 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 \
ca-certificates \
curl \
gnupg \
lsb-release
set -eo pipefail
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo chmod a+r /etc/apt/keyrings/docker.gpg
doRemove() {
sudo apt purge -y docker* podman-docker containerd runc
}
sudo apt update
sudo apt install -y --autoremove \
install_() {
echo
echo "==============================================="
echo "Installing Docker"
echo "==============================================="
echo
doRemove
sudo apt install -y ca-certificates lsb-release
source /etc/os-release
codename="$VERSION_CODENAME"
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 $codename stable" \
| sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y \
docker-ce \
docker-ce-cli \
containerd.io \
docker-compose-plugin \
docker-compose
sudo usermod -aG docker anthony
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
}
echo
echo "Finish!"
echo "Probably, you need to relogin to apply 'docker' group."
echo "Your ones currently are: $(groups)"
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
echo
echo "Finish!"
echo
}
remove() {
echo
echo "==============================================="
echo "Removing Docker"
echo "==============================================="
echo
doRemove
echo
echo "Finish!"
echo
}
case "$1" in
u|upgrade|update) upgrade ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac

22
install/dots Executable file
View File

@@ -0,0 +1,22 @@
#!/usr/bin/env bash
##makedesc: Install dotfiles
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
title
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
dotfiles_src_dir="`dirname $install_dir`/dotfiles"
postfix=".bak-`date '+%Y%m%d%H%M'`"
install_dotfile() {
mv "$HOME/$1" "$HOME/$1$postfix"
cp "$dotfiles_src_dir/$1" "$HOME/$1"
success "- $1"
}
install_dotfile ".bash_aliases" && \
install_dotfile ".profile" && \
install_dotfile ".bashrc" && \
install_dotfile ".gitconfig" && \
install_dotfile ".gitignore" && \
install_dotfile ".git_aliases"

View File

@@ -1,20 +1,21 @@
#!/bin/bash
##makedesc: Install droidcam v1.8.2
#!/usr/bin/env bash
##makedesc: Install droidcam v1.9.0
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
# https://www.dev47apps.com/droidcam/linux/
#TODO
exit
echo
echo "==============================================="
echo "Installing droidcam v1.8.2..."
echo "==============================================="
echo
# https://droidcam.app/linux/
mkdir -p ~/install/droidcam
wget -O /tmp/droidcam.zip https://files.dev47apps.net/linux/droidcam_1.8.2.zip
unzip -o /tmp/droidcam.zip -d ~/install/droidcam
rm -rf /tmp/droidcam.zip
cd ~/install/droidcam && sudo ./install-client
title
echo
echo "Don't forget to install android app: https://play.google.com/store/apps/developer?id=Dev47Apps"
echo
mkdir -p "$HOME/install/deb/"
download "https://beta.droidcam.app/go/droidCam.client.setup.deb" "$HOME/install/deb/droidcam_client_amd64.deb"
dpkg_install "$HOME/install/deb/droidcam_client_amd64.deb"
apt_install v4l2loopback-dkms
success "droidcam installed!"
info "Don't forget to install the android app:"
info "https://play.google.com/store/apps/developer?id=Dev47Apps"

View File

@@ -1,29 +1,43 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install droidcam-obs plugin v1.5.1
#TODO
# ffmpeg -version | head -n 1 | awk '{print $3}'
# https://github.com/dev47apps/droidcam-obs-plugin/releases
exit
# https://www.dev47apps.com/droidcam/linux/
# 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
echo "==============================================="
echo "Installing droidcam-obs..."
echo "==============================================="
echo
command -v "obs" >/dev/null 2>&1 || echo 'You need to install obs first!'
# command -v "obs" >/dev/null 2>&1 || echo 'You need to install obs first!'
command -v "obs-studio" >/dev/null 2>&1 || echo 'You need to install obs-studio first!'
mkdir -p ~/install/droidcam-obs
mkdir -p $HOMEinstall/droidcam-obs
wget -O /tmp/droidcam-obs.zip https://files.dev47apps.net/obs/droidcam_obs_1.5.1_linux.zip
unzip -o /tmp/droidcam-obs.zip -d ~/install/droidcam-obs
unzip -oq /tmp/droidcam-obs.zip -d $HOMEinstall/droidcam-obs
rm -rf /tmp/droidcam-obs.zip
cd ~/install/droidcam-obs && ./install.sh
cd $HOMEinstall/droidcam-obs && ./install.sh
sudo modprobe v4l2loopback video_nr=2 card_label="OBS Virtual Camera"
echo
echo "Finish!"
echo "Don't forget to:"
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 "3) If virtual camera not starting then execute:"
echo "\tsudo modprobe v4l2loopback video_nr=2 card_label="OBS Virtual Camera""
echo "3) if virtual camera not starting then execute:"
echo -e "\tsudo modprobe v4l2loopback video_nr=2 card_label=\"OBS Virtual Camera\""
echo

54
install/flameshot Executable file
View File

@@ -0,0 +1,54 @@
#!/usr/bin/env bash
##makedesc: Install flameshot (latest)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
title
# 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. If you are just building and don't want to
# install, comment this environment variable.
# This excludes the bin/flameshot part of the install,
# e.g. in /opt/flameshot/bin/flameshot, the CMAKE_INSTALL_PREFIX is /opt/flameshot
# This must be an absolute path. Requires CMAKE 3.29.
export CMAKE_INSTALL_PREFIX=/opt/flameshot
cd "$clone_dir" && \
git pull && \
cmake -S . -B "$BUILD_DIR" && \
cmake --build "$BUILD_DIR"
[ $? = 0 ] && {
echo
success "flameshot installed!"
# /opt/flameshot/flameshot -v
echo
}

View File

@@ -1,8 +0,0 @@
#!/bin/bash
##makedesc: [TODO] Build flameshot from src (latest)
echo
echo "==============================================="
echo "Installing flameshot (latest)..."
echo "==============================================="
echo

View File

@@ -1,40 +1,38 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install git (latest)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
echo
echo "==============================================="
echo "Installing git (latest)..."
echo "==============================================="
echo
title
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed make && sudo apt install -y make
require make
if installed git; then
if [ -d "${HOME}/install/git" ]; then
cd "${HOME}/install/git" && \
if [ -d "$HOME/install/git" ]; then
cd "$HOME/install/git" && \
git pull
else
git clone https://github.com/git/git.git --depth=1 "${HOME}/install/git" && \
cd "${HOME}/install/git"
clone "https://github.com/git/git.git" "$HOME/install/git" --depth=1 --single-branch && \
cd "$HOME/install/git"
fi
sudo make prefix=/usr/local all && \
sudo make prefix=/usr/local install
else
! installed wget && sudo apt install -y wget
[ -d "${HOME}/install/git" ] || mkdir -p "${HOME}/install/git"
wget https://github.com/git/git/archive/master.zip -O /tmp/git.zip && \
unzip -q /tmp/git.zip -d "${HOME}/install/git" && \
require wget
mkdir -p "$HOME/install/git"
download "https://github.com/git/git/archive/master.zip" "/tmp/git.zip" && \
unzip -oq "/tmp/git.zip" -d "$HOME/install/git" && \
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 install && \
cd - && \
rm -rf git && \
git clone https://github.com/git/git.git --depth=1 "${HOME}/install/git"
clone "https://github.com/git/git.git" "$HOME/install/git" --depth=1 --single-branch
fi
git --version
[ $? = 0 ] && {
echo
success "git installed!"
git --version
echo
}

View File

@@ -1,27 +1,57 @@
#!/bin/bash
##makedesc: Install golang v1.18.3
#!/usr/bin/env bash
##makedesc: Install golang
# https://go.dev/dl/
# 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"
FILE="go$VERSION.linux-amd64.tar.gz"
doRemove() {
[ -d "/usr/local/go" ] && sudo rm -rf "/usr/local/go"
}
echo
echo "==============================================="
echo "Installing golang v$VERSION..."
echo "==============================================="
echo
install() {
dlUrl="https://go.dev/dl"
json=$(curl -sSL "$dlUrl/?mode=json")
version=$(echo "$json" | jq -r '.[0].version')
echo
echo "==============================================="
echo "Installing golang v$version"
echo "==============================================="
echo
latestJson=$(echo "$json" | jq -r '.[0].files.[] | select (.kind == "archive" and .os == "linux" and .arch == "amd64")')
fileName=$(echo "$latestJson" | jq -r '.filename')
fileUrl="$dlUrl/$fileName"
downloadPath="$HOME/install"
archivePath="$downloadPath/$fileName"
doRemove
[ -f "$archivePath" ] || wget "$fileUrl" -O "$archivePath"
[ -f "$archivePath" ] && sudo tar -xzf "$archivePath" -C /usr/local
sudo chown "$USER": -R /usr/local/go
echo 'export PATH="/usr/local/go/bin:$PATH"' >> "$HOME/.profile"
echo "export GOPATH=\"\$HOME/.go\"" >> "$HOME/.profile"
echo
go version
go install github.com/go-delve/delve/cmd/dlv@latest
go install
echo "Finish!"
}
remove() {
echo
echo "==============================================="
echo "Removing golang"
echo "==============================================="
echo
doRemove
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
sudo rm -rf /usr/local/go && \
wget "https://golang.org/dl/$FILE" -O /tmp/$FILE && \
sudo tar -xzf /tmp/$FILE -C /usr/local && \
rm -rf /tmp/$FILE && \
sudo chown $USER: -R /usr/local/go && \
echo 'export PATH="$PATH:/usr/local/go/bin\"' >> $HOME/.profile && \
echo 'export GOPATH="$HOME/.go"' >> $HOME/.profile && \
# source ~/.profile && \
go version && \
echo "NOTE: now run 'source ~/.profile' to apply new env vars"

15
install/grub-customizer Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
##makedesc: Install grub-customizer (latest + ppa)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
title
sudo add-apt-repository -y ppa:danielrichter2007/grub-customizer && \
sudo apt install -y --autoremove grub-customizer
[ $? = 0 ] && {
echo
success "grub-customizer installed!"
grub-customizer -v
echo
}

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

View File

@@ -1,4 +1,4 @@
#!/bin/bash (latest)
#!/usr/bin/env bash (latest)
##makedesc: Install KDE Window AppMenu Applet
echo
@@ -29,7 +29,7 @@ if installed 'git'; then
sudo git clone https://github.com/psifidotos/applet-window-appmenu.git --depth=1 /usr/src/appmenu-applet
else
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 rm -rf /usr/src/appmenu-applet/applet-window-appmenu-master

View File

@@ -1,14 +1,9 @@
#!/bin/bash
##makedesc: Install KDE Backports + ppa
#!/usr/bin/env bash
##makedesc: Install KDE Backports
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
echo
echo "==============================================="
echo "Installing KDE Backports + ppa..."
echo "==============================================="
echo
title
sudo add-apt-repository -y ppa:kubuntu-ppa/backports
sudo add-apt-repository -y ppa:kubuntu-ppa/backports-extra
sudo apt update
sudo pkcon update
sudo apt full-upgrade
sudo add-apt-repository -y ppa:kubuntu-ppa/backports && \
sudo apt update && \
sudo apt full-upgrade

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install file templates (KDE)
echo
@@ -48,7 +48,7 @@ EOF
echo "- Shell" ####################################################
cat <<EOF > "$TPL_SRC/template.sh"
#!/bin/bash
#!/usr/bin/env bash
EOF
cat << EOF > "$TPL_DIR/sh.desktop"

19
install/kde-portal Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
##makedesc: Install KDE portal
echo
echo "==============================================="
echo "Installing KDE portal..."
echo "==============================================="
echo
sudo apt install -y \
xdg-desktop-portal \
xdg-desktop-portal-kde \
xdg-desktop-portal-gtk && \
echo "GTK_USE_PORTAL=1" | sudo tee -a /etc/environment && \
echo "XDG_CURRENT_DESKTOP=KDE" | sudo tee -a /etc/environment
echo
echo "Finish! Now you need to relogin"
echo

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install libreoffice
echo

View File

@@ -1,34 +1,55 @@
#!/bin/bash
##makedesc: Install lite-xl v2.0.5 (draft)
#!/usr/bin/env bash
##makedesc: Install lite-xl v2.1.7
# https://github.com/lite-xl/lite-xl/releases
# https://lite-xl.com/setup/getting-started/
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
# DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT DRAFT
# https://github.com/lite-xl/lite-xl
[ $1 ] && LITEXLVER="$1" || LITEXLVER="2.0.5"
echo
echo "==============================================="
echo "Installing lite-xl v${LITEXLVER}..."
echo "Installing lite-xl v2.1.7..."
echo "==============================================="
echo
wget "https://github.com/lite-xl/lite-xl/releases/download/v${LITEXLVER}/lite-xl-linux-x86_64.tar.gz" -O /tmp/lite-xl.tar.gz
sudo tar -xzf /tmp/lite-xl.tar.gz -C /tmp
mkdir -p $HOME/.local/bin && cp /tmp/lite-xl/bin/lite-xl $HOME/.local/bin
cp -r /tmp/lite-xl/share $HOME/.local
rm -rf /tmp/lite-xl*
echo -e 'export PATH="$PATH:$HOME/.local/bin"' >> $HOME/.bashrc
[ -f $HOME/.zshrc ] && echo -e 'export PATH="$PATH:$HOME/.local/bin"' >> $HOME/.zshrc
xdg-desktop-menu forceupdate
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"
lpm_url="https://github.com/lite-xl/lite-xl-plugin-manager/releases/download/latest/lpm.x86_64-linux"
tar_filepath="$HOME/install/lite-xl-v2.1.7.tar.gz"
untar_dir="$HOME/install"
### uninstall
# rm -f $HOME/.local/bin/lite-xl
# rm -rf $HOME/.local/share/icons/hicolor/scalable/apps/lite-xl.svg \
# $HOME/.local/share/applications/org.lite_xl.lite_xl.desktop \
# $HOME/.local/share/metainfo/org.lite_xl.lite_xl.appdata.xml \
# $HOME/.local/share/lite-xl
rm -rf \
"$HOME/.local/bin/lpm" \
"$HOME/install/lite-xl" \
"$HOME/.local/bin/lite-xl" \
"$HOME/.local/share/lite-xl"
mkdir -vp \
"$untar_dir" \
"$HOME/.local/bin" \
"$HOME/.local/share/lite-xl"
wget "$tar_url" -O "$tar_filepath" && \
wget "$lpm_url" -O "$HOME/.local/bin/lpm" && \
chmod +x "$HOME/.local/bin/lpm" && \
tar -xzf "$tar_filepath" -C "$untar_dir" && \
cp -vf "$untar_dir/lite-xl/lite-xl" "$HOME/.local/bin/" && \
cp -vfr "$untar_dir"/lite-xl/data/* "$HOME/.local/share/lite-xl/"
# 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"
[Desktop Entry]
Type=Application
Name=Lite XL
Comment=A lightweight text editor written in Lua
Exec=$HOME/.local/bin/lite-xl %F
Icon=lite-xl
Terminal=false
StartupWMClass=lite-xl
Categories=Development;IDE;
MimeType=text/plain;
EOF
sudo update-desktop-database && \
xdg-desktop-menu forceupdate
echo
echo "Finish!"
echo

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install mariadb (latest) and php-mysql + phpMyAdmin (if php is installed)
echo

66
install/nerd-fonts Executable file
View File

@@ -0,0 +1,66 @@
#!/usr/bin/env bash
##makedesc: Install nerd-fonts
set -eo pipefail
#TODO nokia-sans
downloadPath="$HOME/install/nerd-fonts"
installPath="$HOME/.local/share/fonts/"
url="https://github.com/ryanoasis/nerd-fonts/releases/latest/download"
fonts=(
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 "${fonts[@]}"; do
fontdir="$installPath/Nerd-$fontname"
wget "$url/$fontname.tar.xz" -O "$downloadPath/$fontname.tar.xz"
[[ -d "$installPath/$fontname" ]] || mkdir -p "$fontdir"
tar -xJf "$downloadPath/$fontname.tar.xz" -C "$fontdir"
done
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 {} +
fc-cache -vf "$installPath"
echo
echo "Finish!"
echo
}
case "$1" in
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install nodejs + npm via nvm
echo
@@ -11,20 +11,17 @@ installed() {
command -v "$1" >/dev/null 2>&1
}
# sudo apt install -y --autoremove nodejs npm
installed "nvm" && sudo apt install -y --autoremove nodejs npm nvm
if !installed "nvm"; then
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
fi
! installed "nvm" && wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
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
nvm install-latest-npm
fi
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
nvm install-latest-npm
nvm install node
nvm use node
installed "node" && nvm current
echo "Finish!"
nvm current
nvm ls

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install ntfy (latest) + ppa
echo

80
install/nvim Executable file
View File

@@ -0,0 +1,80 @@
#!/usr/bin/env bash
##makedesc: Install nvim + lazyvim
set -eo pipefail
# 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
url="https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz"
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 -v "$path" "$path-$t.bak"
done
echo "Done"
}
install() {
echo
echo "==============================================="
echo "Installing neovim"
echo "==============================================="
echo
backup
wget "$url" -O "$downloadTarGz"
tar -xzf "$downloadTarGz" -C "$downloadPath"
sudo rm -rf "$installPath"
sudo mv "$downloadPath/nvim-linux-x86_64" "$installPath"
git clone --depth=1 --single-branch https://github.com/LazyVim/starter "$cfgPath"
rm -rf "$cfgPath/.git"
sudo update-desktop-database
xdg-desktop-menu forceupdate
echo
echo "Finish!"
nvim -v
echo
}
remove() {
echo
echo "==============================================="
echo "Removing nerd-fonts"
echo "==============================================="
echo
find "$downloadPath" -type d -name "Nerd-*" -exec rm -rf {} +
fc-cache -vf "$downloadPath"
echo
echo "Finish!"
echo
}
case "$1" in
b|backup) backup ;;
r|remove|d|delete|p|purge) remove ;;
*) install ;;
esac
# export PATH="$PATH:/opt/nvim-linux-x86_64/bin"

10
install/obs-studio Executable file
View File

@@ -0,0 +1,10 @@
#!/usr/bin/env bash
##makedesc: Install obs-studio (latest snap)
echo
echo "==============================================="
echo "Installing obs-studio (latest snap)..."
echo "==============================================="
echo
sudo snap install obs-studio

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install omz (latest)
echo

View File

@@ -1,6 +1,15 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install omz fancy (powerline10k + MesloLGS font)
# https://gist.github.com/anthonyaxenov/b8460935d06b9f0da72def03d0f26515
# Based on:
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions
# https://github.com/ohmyzsh/ohmyzsh
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/
echo
echo "==============================================="
echo "Installing omz fancy: powerline10k + MesloLGS font..."

31
install/openvpn Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
##makedesc: Install openvpn v2.6.3 (src)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
# https://openvpn.net/community-downloads/
# https://openvpn.net/community-resources/installing-openvpn/
[ "$1" ] && OVPNVER="$1" || OVPNVER='2.6.3'
title "Installing openvpn v${OVPNVER} (src)..."
require libssl-dev \
liblzo2-dev \
libpam0g-dev
mkdir -p "$HOME/install/"
download "https://swupdate.openvpn.org/community/releases/openvpn-${OVPNVER}.tar.gz" "$HOME/install/openvpn-${OVPNVER}.tar.gz" && \
unpack_targz "$HOME/install/openvpn-${OVPNVER}.tar.gz" "$HOME/install/" && \
cd "$HOME/install/openvpn-${OVPNVER}" && \
sudo ./configure && \
sudo make && \
sudo make install &&
apt_install network-manager-openvpn \
network-manager-openvpn-gnome
[ $? = 0 ] && {
echo
success "openvpn installed!"
openvpn --version
echo
}

View File

@@ -1,33 +1,27 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install papirus-icon-theme (latest)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
echo
echo "==============================================="
echo "Installing papirus-icon-theme (latest)..."
echo "==============================================="
echo
title
installed() {
command -v "$1" >/dev/null 2>&1
}
mkdir -p "$HOME/install/papirus-icon-theme" "$HOME/.local/share/icons/"
if installed git; then
mkdir -p "${HOME}/install/"
git clone https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git --depth=1 "${HOME}/install/papirus-icon-theme"
clone_quick https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git "$HOME/install/"
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"
download https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O "$HOME/install/papirus-icon-theme.zip" && \
unzip -oq "$HOME/install/papirus-icon-theme.zip" -d "$HOME/install/papirus-icon-theme" && \
rm -f "$HOME/install/papirus-icon-theme.zip"
fi
mkdir -p "${HOME}/.local/share/icons/"
ln -s "${HOME}/install/papirus-icon-theme/Papirus" "${HOME}/.local/share/icons/Papirus"
ln -s "${HOME}/install/papirus-icon-theme/Papirus-Dark" "${HOME}/.local/share/icons/Papirus-Dark"
ln -s "${HOME}/install/papirus-icon-theme/Papirus-Light" "${HOME}/.local/share/icons/Papirus-Light"
symlink "$HOME/install/papirus-icon-theme/Papirus" "$HOME/.local/share/icons/Papirus" && \
symlink "$HOME/install/papirus-icon-theme/Papirus-Dark" "$HOME/.local/share/icons/Papirus-Dark" && \
symlink "$HOME/install/papirus-icon-theme/Papirus-Light" "$HOME/.local/share/icons/Papirus-Light"
[ $? = 0 ] && {
echo
success "Papirus icons installed!"
info "You can find them in $HOME/.local/share/icons/"
echo
}
echo
echo "Finish! Don't forget to change current icon theme."
echo "You can find them here:"
echo -e "\t${HOME}/.local/share/icons/"
echo

View File

@@ -1,16 +1,14 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install postgresql (latest) and php-pgsql (if php is installed)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
echo
echo "==============================================="
echo "Installing postgresql (latest)..."
echo "==============================================="
echo
title
installed() {
command -v "$1" >/dev/null 2>&1
}
sudo apt install -y --autoremove postgresql postgresql-contrib
sudo service postgresql restart
installed 'php' && sudo apt install -y --autoremove php-pgsql
require postgresql postgresql-contrib && \
sudo service postgresql restart && \
{
echo
success "openvpn installed!"
postgres --version
echo
}

View File

@@ -1,34 +1,42 @@
#!/bin/bash
##makedesc: Install php v8.1 + ppa
#!/usr/bin/env bash
##makedesc: Install php v8.4
[ $1 ] && PHPVER="$1" || PHPVER="8.1"
[ "$1" ] && PHPVER="$1" || PHPVER="8.4"
echo
echo "==============================================="
echo "Installing php${PHPVER}..."
echo "==============================================="
echo
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
sudo apt install -y --autoremove \
php${PHPVER} \
php${PHPVER}-fpm \
php${PHPVER}-dev \
php${PHPVER}-apcu \
php${PHPVER}-bcmath \
php${PHPVER}-cli \
php${PHPVER}-common \
php${PHPVER}-xdebug \
php${PHPVER}-dom \
php${PHPVER}-curl \
php${PHPVER}-bcmath \
php${PHPVER}-dev \
php${PHPVER}-dom \
php${PHPVER}-gd \
php${PHPVER}-intl \
php${PHPVER}-mbstring \
# php${PHPVER}-mysql \
# php${PHPVER}-opcache \
# php${PHPVER}-pgsql \
php${PHPVER}-mysql \
php${PHPVER}-opcache \
php${PHPVER}-pgsql \
php${PHPVER}-simplexml \
php${PHPVER}-soap \
# php${PHPVER}-xml \
# php${PHPVER}-xmlrpc \
# php${PHPVER}-xsl \
# php${PHPVER}-sqlite3 \
# php${PHPVER}-zip \
php${PHPVER}-sqlite3 \
php${PHPVER}-xdebug \
php${PHPVER}-xml \
php${PHPVER}-xmlrpc \
php${PHPVER}-zip
# php${PHPVER}-ldap \
# php${PHPVER}-dba \
# php${PHPVER}-ldap
# php${PHPVER}-xsl \
echo
echo "Finish!"
php -v
echo

30
install/php-psalm Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
##makedesc: Install psalm
echo
echo "==============================================="
echo "Installing psalm..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "$HOME/.profile"
}
source "$HOME/.profile"
composer global require vimeo/psalm --dev
echo
echo "Finish!"
psalm --version
echo

46
install/php-spx Executable file
View File

@@ -0,0 +1,46 @@
#!/usr/bin/env bash
##makedesc: Install php-spx
echo
echo "==============================================="
echo "Installing php-spx..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
! installed 'phpize' && echo 'ERROR: You need php-dev to be installed' && exit 2
! installed 'make' && sudo apt install -y make
! installed 'wget' && sudo apt install -y wget
[ -d "$HOME/install/php-spx" ] || mkdir -p "$HOME/install/php-spx"
wget https://github.com/NoiseByNorthwest/php-spx/archive/refs/heads/release/latest.zip -O /tmp/php-spx.zip \
&& unzip -oq /tmp/php-spx.zip -d "$HOME/install/php-spx" \
&& rm /tmp/php-spx.zip \
&& cd "$HOME/install/php-spx/php-spx-release-latest" \
&& phpize \
&& ./configure \
&& make \
&& sudo make install
PHPVER=`php -r 'echo ($v=explode(".",PHP_VERSION))[0].".".$v[1];'`
cat << EOF | sudo tee -a "/etc/php/${PHPVER}/mods-available/spx.ini"
; https://github.com/NoiseByNorthwest/php-spx/tree/release/latest#configuration
; https://habr.com/ru/post/505192/
; extension=spx.so
; spx.data_dir = '/tmp/spx'
spx.http_enabled = 0
spx.http_key = 'spx'
; spx.http_ip_whitelist = "127.0.0.1"
EOF
sudo ln -sf "/etc/php/${PHPVER}/mods-available/spx.ini" "/etc/php/${PHPVER}/cli/conf.d/99-spx.ini"
echo
echo "Finish!"
echo

32
install/phpcs Executable file
View File

@@ -0,0 +1,32 @@
#!/usr/bin/env bash
##makedesc: Install phpcs + php-cs-fixer
echo
echo "==============================================="
echo "Installing phpcs + php-cs-fixer..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "$HOME/.profile"
}
source "$HOME/.profile"
composer global require squizlabs/php_codesniffer --dev
composer global require friendsofphp/php-cs-fixer --dev
echo
echo "Finish!"
phpcs --version # phpcbf --version
php-cs-fixer --version
echo

30
install/phpmd Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
##makedesc: Install phpmd
echo
echo "==============================================="
echo "Installing phpmd..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "$HOME/.profile"
}
source "$HOME/.profile"
composer global require phpmd/phpmd --dev
echo
echo "Finish!"
phpmd --version
echo

31
install/phpstan Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
##makedesc: Install phpstan
echo
echo "==============================================="
echo "Installing phpstan..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "$HOME/.profile"
}
source "$HOME/.profile"
composer global require phpstan/phpstan --dev
echo
echo "Finish!"
phpstan --version
echo

31
install/phpunit Executable file
View File

@@ -0,0 +1,31 @@
#!/usr/bin/env bash
##makedesc: Install phpunit
echo
echo "==============================================="
echo "Installing phpunit..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed 'php' && echo 'ERROR: You need php to be installed' && exit 1
! installed "composer" && echo "ERROR: You need composer to be installed" && exit 2
COMPOSER_GLOBAL_HOME="$(composer config -g home)"
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
$NEWPATH
echo "$NEWPATH" >> "$HOME/.profile"
}
source "$HOME/.profile"
composer global require phpunit/phpunit --dev
echo
echo "Finish!"
phpunit --version
echo

View File

@@ -1,28 +1,33 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install postman (latest)
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
echo
echo "==============================================="
echo "Installing postman (latest)..."
echo "==============================================="
echo
# https://learning.postman.com/docs/getting-started/installation-and-updates/#installing-postman-on-linux
mkdir -p ${HOME}/install/postman
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 -s ${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
# set -ex
title
mkdir -p "$HOME/install" && \
"$HOME/.local/bin" && \
"$HOME/.local/share/applications"
download "https://dl.pstmn.io/download/latest/linux64" "$HOME/install/postman.tar.gz" && \
unpack_targz "$HOME/install/postman.tar.gz" "$HOME/install" && \
symlink "$HOME/install/Postman/Postman" "$HOME/.local/bin/postman" && \
cat << EOF > "$HOME/.local/share/applications/Postman.desktop" && sudo update-desktop-database
[Desktop Entry]
Name=Postman
Exec=${HOME}/.local/bin/postman
Icon=${HOME}/install/postman/Postman/app/icons/icon_128x128.png
Categories=Utility,Network
Exec=$HOME/.local/bin/postman %U
Icon=$HOME/install/Postman/app/resources/app/assets/icon.png
Categories=Development,Network
Terminal=false
Type=Application
Encoding=UTF-8
EOF
sudo update-desktop-database
[ $? = 0 ] && {
echo
success "Postman installed!"
echo
}

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install qt5
echo

View File

@@ -1,15 +1,24 @@
#!/bin/bash
##makedesc: Install rustdesk client v1.1.9 (deb)
#!/usr/bin/env bash
##makedesc: Install rustdesk client v1.4.2 (deb)
[ $1 ] && RDVER="$1" || RDVER="1.1.9"
[ "$1" ] && RDVER="$1" || RDVER="1.4.2"
echo
echo "==============================================="
echo "Installing rustdesk v${RDVER}..."
echo "Installing rustdesk v$RDVER..."
echo "==============================================="
echo
# https://github.com/rustdesk/rustdesk
sudo apt install libxdo3 && \
wget "http://github.com/rustdesk/rustdesk/releases/download/${RDVER}/rustdesk-${RDVER}.deb" -O ${HOME}/install/rustdesk_${RDVER}.deb && \
sudo dpkg -i ${HOME}/install/rustdesk_${RDVER}.deb
deb_path="$HOME/install"
deb_name="rustdesk-$RDVER.deb"
mkdir -p "$deb_path"
deb="$deb_path/$deb_name"
sudo apt install -y libxdo3 python3-pip
wget "https://github.com/rustdesk/rustdesk/releases/download/$RDVER/$deb_name" -O "$deb"
sudo dpkg -i "$deb"
# flatpak install -y com.rustdesk.RustDesk
# https://develop.kde.org/docs/administration/portal-permissions/
# flatpak permission-set kde-authorized remote-desktop com.rustdesk.RustDesk yes

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install bunch of software from snap
echo
@@ -18,27 +18,26 @@ snapi() {
if ! installed snapd; then
sudo apt update
sudo apt install -y --autoremove snapd gnome-software-plugin-snap
sudo apt install -y --autoremove snapd #gnome-software-plugin-snap
fi
# snapi snap-store
snapi telegram-desktop
snapi code
# snapi phpstorm
snapi skype
# snapi audacity
# snapi flameshot
# snapi gtk-common-themes
# snapi gtk2-common-themes
# snapi kde-frameworks-5-core18
snapi zoom-client
snapi peek
# snapi telegram-desktop #todo
# snapi code # deb https://github.com/microsoft/vscode/issues/221836
snapi skype
snapi dbeaver-ce
# snapi mysql-workbench-community
# snapi discord
# snapi phpstorm
# snapi audacity
# snapi flameshot # deb
# snapi zoom-client # deb
# https://certbot.eff.org/
# snapi certbot
# sudo ln -s /snap/bin/certbot /usr/bin/certbot
# sudo ln -sf /snap/bin/certbot /usr/bin/certbot
# snapi mysql-workbench-community
snapi dbeaver-ce
# snapi discord
# snapi obs-studio

45
install/sublimemerge Executable file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/env bash
##makedesc: Install Sublime Merge
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
# https://www.sublimemerge.com/download
# https://gist.github.com/lugrus2000/1fc55158b87f94d799392a6dd1ac0ce2
# https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47
[ "$1" ] && SMVER="$1" || SMVER='2102'
title
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"
# sudo cp -f $BIN_PATH $BIN_PATH.old
# if [[ $SMVER = 2102 ]]; then
#TODO not working
# printf '\x48\xC7\xC0\x19\x01\x00\x00\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A5400)) conv=notrunc
# printf '\x90\x90\x90\x90\x90' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A7EC9)) conv=notrunc
# printf '\x90\x90\x90\x90\x90' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A7EE4)) conv=notrunc
# printf '\x48\x31\xC0\x48\xFF\xC0\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A67FE)) conv=notrunc
# printf '\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A514E)) conv=notrunc
# printf '\xC3' | sudo dd of=$BIN_PATH bs=1 seek=$((0x003A40D2)) conv=notrunc
#TODO segfault
# echo 0045a360: 48 C7 C0 19 01 00 00 C3 | sudo xxd -r - $BIN_PATH
# echo 0045d21d: 90 90 90 90 90 | sudo xxd -r - $BIN_PATH
# echo 0045d23a: 90 90 90 90 90 | sudo xxd -r - $BIN_PATH
# echo 0045b990: C3 | sudo xxd -r - $BIN_PATH
# echo 0045a05a: C3 | sudo xxd -r - $BIN_PATH
# echo 00459aba: C3 | sudo xxd -r - $BIN_PATH
# fi
echo
success "Sublime Merge installed!"
$BIN_PATH --version
echo

37
install/sublimetext Executable file
View File

@@ -0,0 +1,37 @@
#!/usr/bin/env bash
##makedesc: Install Sublime Text
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
# https://www.sublimetext.com/download
# https://gist.axenov.dev/anthony/sublime
# https://gist.axenov.dev/anthony/sublime2
# https://gist.github.com/lugrus2000/1fc55158b87f94d799392a6dd1ac0ce2
# https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47
[ "$1" ] && STVER="$1" || STVER='4200'
title
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
success "Sublime Text installed!"
$BIN_PATH --version
echo

20
install/suld Executable file
View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
##makedesc: Samsung Unified Linux Driver repo
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
# https://www.bchemnet.com/suldr/
# https://www.bchemnet.com/suldr/supported.html
title
mkdir -vp "$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"
apt_install suld-driver2-1.00.39
success "Samsung Unified Linux Driver installed!"
info "Don't forget to connect your Samsung printer"
info "See more info here: https://www.bchemnet.com/suldr/"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install syncthing (latest) + ppa
echo
@@ -24,5 +24,5 @@ sudo apt install -y --autoremove syncthing
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O $HOME/.local/share/applications/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O $HOME/.local/share/applications/syncthing-ui.desktop
ln -s $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop
ln -sf $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop
# или демоном: https://habr.com/ru/post/350892/

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install telebit (latest)
echo

13
install/telegram Executable file
View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
##makedesc: Install telegram (latest)
echo
echo "==============================================="
echo "Installing telegram (latest)..."
echo "==============================================="
echo
mkdir -p "$HOME/install" "$HOME/.local/bin"
wget "https://telegram.org/dl/desktop/linux" -O $HOME/install/telegram.tar.gz && \
tar -xJf $HOME/install/telegram.tar.gz -C $HOME/.local/bin
$HOME/.local/bin/Telegram/Telegram & disown > /dev/null

33
install/tilt Executable file
View File

@@ -0,0 +1,33 @@
#!/bin/bash
mkdir -p ~/install/tilt ~/.local/bin
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
# chmod +x ~/.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
# chmod +x ~/.local/bin/tilt
cd -
echo "Version of ctlptl = $(ctlptl version)"
echo "Version of tilt = $(tilt version)"
echo "Version of kubectl:"
kubectl version

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install ulauncher (latest) + ppa
echo
@@ -7,5 +7,7 @@ echo "Installing ulauncher (latest) + ppa..."
echo "==============================================="
echo
sudo add-apt-repository -y ppa:agornostal/ulauncher
sudo apt install -y --autoremove ulauncher
sudo add-apt-repository universe -y
sudo add-apt-repository ppa:agornostal/ulauncher -y
sudo apt update
sudo apt install ulauncher

19
install/vivaldi Executable file
View File

@@ -0,0 +1,19 @@
#!/usr/bin/env bash
##makedesc: Install Vivaldi + ppa
# https://repo.vivaldi.com
# https://help.vivaldi.com/desktop/#install-update
# https://help.vivaldi.com/desktop/install-update/manual-setup-vivaldi-linux-repositories/
echo
echo "==============================================="
echo "Installing Vivaldi + ppa..."
echo "==============================================="
echo
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor > packages.vivaldi.gpg
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 vivaldi-stable

18
install/vscode Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
##makedesc: VSCode deb-package
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
title
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"
[ $? = 0 ] && {
echo
success "VSCode installed"
code --version
echo
}

View File

@@ -1,5 +1,5 @@
#!/bin/bash
##makedesc: Install wine (latest) + ppa (focal)
#!/usr/bin/env bash
##makedesc: Install wine (latest) + ppa
echo
echo "==============================================="
@@ -9,6 +9,6 @@ echo
sudo dpkg --add-architecture i386
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'
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
wine --version

45
install/youtube-dl Executable file
View File

@@ -0,0 +1,45 @@
#!/usr/bin/env bash
##makedesc: Install youtube-dl (src)
# https://github.com/ytdl-org/youtube-dl#installation
echo
echo "==============================================="
echo "Installing youtube-dl (src)..."
echo "==============================================="
echo
# 11.04.23: release 2021.12.17 in snap/apt/github is broken (Unable to extract uploader id)
# and still no fix officially released, so we just build it from actual sources
# curl -L https://yt-dl.org/downloads/latest/youtube-dl -o "$HOME/.local/bin/youtube-dl" && \
# sudo chmod +rx "$HOME/.local/bin/youtube-dl"
installed() {
command -v "$1" >/dev/null 2>&1
}
! installed make && sudo apt install -y make
mkdir -p "$HOME/install/youtube-dl" "$HOME/.local/bin"
if installed git; then
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
! installed wget && sudo apt install -y wget
wget https://github.com/ytdl-org/youtube-dl/archive/refs/heads/master.zip -O "$HOME/install/youtube-dl.zip" && \
unzip -oq "$HOME/install/youtube-dl.zip" -d "$HOME/install/youtube-dl"
fi
cd "$HOME/install/youtube-dl" && \
make youtube-dl && \
mv youtube-dl "$HOME/.local/bin"
echo
echo "Finish!"
youtube-dl --version
echo

15
install/ytdlcue Executable file
View File

@@ -0,0 +1,15 @@
#!/usr/bin/env bash
##makedesc: Install ytdlcue
# https://gist.github.com/anthonyaxenov/8e11f18493c8419ee7abc94a8ea0cfaf
echo
echo "==============================================="
echo "Installing ytdlcue..."
echo "==============================================="
echo
install_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
tools_dir="`dirname $install_dir`/tools"
cp "${tools_dir}/ytdlcue.sh" "$HOME/.local/bin/ytdlcue"
sudo chmod +rx "$HOME/.local/bin/ytdlcue"

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install zint (latest)
echo

View File

@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
##makedesc: Install vanilla zsh
echo
@@ -8,4 +8,4 @@ echo "==============================================="
echo
sudo apt install -y --autoremove zsh
echo "source ~/.profile" >> ~/.zshrc
echo "source ~/.profile" >> "$HOME/.zshrc"

View File

@@ -1,2 +0,0 @@
# [PACK] php + composer
composer: php composer-clean

View File

@@ -1,2 +0,0 @@
# [TODO] [PACK] qt5 + flameshot from source
flameshot: qt5 flameshot-build

View File

@@ -1,2 +1,2 @@
# [PACK] Apache + php + mariadb
lamp: apache php mariadb
##lamp: [PACK] Apache + php + mariadb
lamp: apache phpstack mariadb

2
packs/obs Normal file
View File

@@ -0,0 +1,2 @@
##obs: [PACK] Install OBS Studio + droidcam-obs
obs: obs-studio droidcam-obs

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
chsh -s /usr/bin/zsh
@exec zsh

2
packs/phpstack Normal file
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
packs/phptools Normal file
View File

@@ -0,0 +1,2 @@
##phpstack: [PACK] Install full php stack with tooling
phpstack: php phptools

6
scripts/README.md Normal file
View File

@@ -0,0 +1,6 @@
# Shell-скрипты
Эти скрипты я писал в разное время для решения разных задач.
Чтобы они не растерялись по репозиториям и носителям, я решил собрать их здесь в одну кучу.
Я всегда использую Ubuntu в качестве своих настольных и серверных ОС, поэтому все эти скрипты писались и использовались в этих средах с версий 18.*.

1
scripts/ddns/afraid/.env Executable file
View File

@@ -0,0 +1 @@
AFRAID_TOKEN=6qfkK3VmHf7t4PwvTUJtxNEQ

25
scripts/ddns/afraid/update.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/bash
# shellcheck disable=SC1091
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
log() {
timestamp="$(date +'%Y-%m-%d %H:%M:%S')"
datestamp="$(date +'%Y-%m-%d')"
[ ! -d "$thisdir/log" ] && mkdir "$thisdir/log"
echo "[$timestamp] $*" >> "$thisdir/log/$datestamp.log"
}
[ ! -f "$thisdir/.env" ] && {
log "ERROR: .env not exists"
exit 1
}
source "$thisdir/.env"
[ -z "$AFRAID_TOKEN" ] && {
log "ERROR: env var AFRAID_TOKEN not specified"
exit 1
}
result=$(curl -s "http://sync.afraid.org/u/${AFRAID_TOKEN}/")
log "$result"

View File

@@ -0,0 +1,3 @@
DUCK_TOKEN=
DUCK_DOMAINS=
DUCK_IP=

2
scripts/ddns/duckdns/.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.env
*.log

View File

@@ -0,0 +1,9 @@
#!/bin/bash
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
# https://www.duckdns.org/install.jsp
croncmd="$thisdir/update.sh"
cronjob="*/30 * * * * $croncmd" # every 30 min
( crontab -l | grep -v -F "$croncmd" ; echo "$cronjob" ) | crontab -
cp -f "$thisdir/.env.example" "$thisdir/.env"

View File

@@ -0,0 +1,3 @@
#!/bin/bash
( crontab -l | grep -v -F "duckdns" ) | crontab -

30
scripts/ddns/duckdns/update.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
# shellcheck disable=SC1091
thisdir="$( dirname "$(readlink -e -- "${BASH_SOURCE[0]}")")"
log() {
timestamp="$(date +'%Y-%m-%d %H:%M:%S')"
datestamp="$(date +'%Y-%m-%d')"
[ ! -d "$thisdir/log" ] && mkdir "$thisdir/log"
echo "[$timestamp] $*" >> "$thisdir/log/$datestamp.log"
}
[ ! -f "$thisdir/.env" ] && {
log "ERROR: .env not exists"
exit 1
}
source "$thisdir/.env"
[ -z "$DUCK_TOKEN" ] && {
log "ERROR: env var DUCK_TOKEN not specified"
exit 1
}
[ -z "$DUCK_DOMAINS" ] && {
log "ERROR: env var DUCK_DOMAINS not specified"
exit 1
}
result=$(curl -s "https://www.duckdns.org/update?domains=${DUCK_DOMAINS}&token=${DUCK_TOKEN}&ip=${DUCK_IP}")
log "$result"

5
scripts/disable-ipv6.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
sudo sysctl -w net.ipv6.conf.all.disable_ipv6="$1"
sudo sysctl -w net.ipv6.conf.default.disable_ipv6="$1"
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6="$1"

View File

@@ -1,54 +1,55 @@
#!/bin/bash
#!/usr/bin/env bash
# https://gist.github.com/anthonyaxenov/c16e1181d4b8a8644c57ec8a1f6cf21c
#########################################################################
# #
# Set display resolution #
# Set output resolution #
# #
# Author: Anthony Axenov (Антон Аксенов) #
# Version: 1.0 #
# License: WTFPL #
# License: WTFPLv2 #
# #
#########################################################################
# #
# Using this script you can change your display resolution #
# Using this script you can change your output 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
# Set output name to work with. You can get it via 'xrandr --listactivemonitors'
output="HDMI-3"
# Set width of this output in px
width=1920
# Set height of this output in px
height=1080
# Set refresh rate in Hz of this output in px
refresh=120
# 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")
modeline=$(cvt ${width} ${height} ${refresh} | grep "Modeline")
# modeline=$(gtf ${width} ${height} ${refresh} | grep "Modeline")
# Some important data needed to xrandr:
modename="${width}x${height}_my"
modename="${width}x${height}@${refresh}_my"
params=$(echo "$modeline" | sed "s|^\s*Modeline\s*\"[0-9x_.]*\"\s*||")
echo "Set resolution ${width}x${height} on display $display:"
echo "Set resolution ${width}x${height}@${refresh} on output $output:"
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
# 1. Switch output to safe mode which always exists (I believe) to avoid errors
xrandr --output $output --mode 640x480 --verbose
# 2. If output 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.1. Detach mode from output
xrandr --delmode $output $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
xrandr --newmode $modename $params --verbose
# 4. Attach mode to our output
xrandr --addmode $output $modename --verbose
# 5. Switch output to this mode immidiately
xrandr --output $output --mode $modename --refresh $refresh --verbose

11
scripts/display-rotate.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# X11:
# xrandr --listactivemonitors
# xrandr --output $OUTPUT --rotate (left|right|normal|...)
# Wayland KDE: https://www.reddit.com/r/kde/comments/11vrbwc/how_do_i_rotate_the_screen_on_kde_with_wayland/
# kscreen-doctor --outputs
OUTPUT='HDMI-A-1'
[ "$1" ] && DIRECTION="$1" || DIRECTION="normal" # (left|right|normal|inverted)
kscreen-doctor "output.$OUTPUT.rotation.$DIRECTION"

View File

@@ -0,0 +1,47 @@
#!/usr/bin/env bash
# Original filename: docker-volume-snapshot
# Author: Juned Khatri
# License: MIT
# Repo: https://github.com/junedkhatri31/docker-volume-snapshot
set -e -o pipefail
programname=`basename "$0"`
display_usage() {
echo "usage: $programname (create|restore) source destination"
echo " create create snapshot file from docker volume"
echo " restore restore snapshot file to docker volume"
echo " source source path"
echo " destination destination path"
echo
echo "Tip: Supports tar's compression algorithms automatically"
echo " based on the file extention, for example .tar.gz"
echo
echo "Examples:"
echo "docker-volume-snapshot create xyz_volume xyz_volume.tar"
echo "docker-volume-snapshot create xyz_volume xyz_volume.tar.gz"
echo "docker-volume-snapshot restore xyz_volume.tar xyz_volume"
echo "docker-volume-snapshot restore xyz_volume.tar.gz xyz_volume"
}
case "$1" in
"create")
if [[ -z "$2" || -z "$3" ]]; then display_usage; exit 1; fi
directory=`dirname "$3"`
if [ "$directory" == "." ]; then directory=$(pwd); fi
filename=`basename "$3"`
docker run --rm -v "$2:/source" -v "$directory:/dest" busybox tar cvaf "/dest/$filename" -C /source .
;;
"restore")
if [[ -z "$2" || -z "$3" ]]; then display_usage; exit 1; fi
directory=`dirname "$2"`
if [ "$directory" == "." ]; then directory=$(pwd); fi
filename=`basename "$2"`
docker run --rm -v "$3:/dest" -v "$directory:/source" busybox tar xvf "/source/$filename" -C /dest
;;
*)
display_usage
exit 1 # Command to come out of the program with status 1
;;
esac

50
scripts/fix-obs-vcam.sh Executable file
View File

@@ -0,0 +1,50 @@
#!/usr/bin/env bash
# https://obsproject.com/kb/virtual-camera-troubleshooting
# https://obsproject.com/forum/threads/how-to-start-virtual-camera-without-sudo-privileges.139783/
# https://blog.csdn.net/qq_43008667/article/details/128041455
# https://blog.jbrains.ca/permalink/using-obs-studio-as-a-virtual-cam-on-linux
# https://github.com/obsproject/obs-studio/issues/4808
# v4l2loopback-dkms
# obs_start()
# {
# #This function is intended to prevent blank cameras in OBS upon OBS restart / exit
# #1. load/refresh uvcvideo before starting obs
# if lsmod | grep -q 'uvcvideo'; then
# sudo rmmod uvcvideo
# fi
# sudo modprobe uvcvideo
# #2. since no environment with a keyring to prompt for allowing virtual webcams prior is a must
# sudo modprobe v4l2loopback video_nr=10 card_label='OBS Virtual Camera'
# sleep 1
# sh -c "$obs_cmd --startvirtualcam || sleep 3; sudo rmmod uvcvideo"
# }
installed () {
command -v $1 > /dev/null
}
installed 'obs' && obs_cmd='obs'
installed 'obs-studio' && obs_cmd='obs-studio'
# obs executes this command when you start virtual camera
# sudo modprobe v4l2loopback exclusive_caps=1 card_label="OBS Virtual Camera"
# another version from one of links below
# sudo modprobe v4l2loopback video_nr=2 devices=1 card_label="OBS Virtual Camera"
sudo modprobe -r v4l2loopback || sudo rmmod v4l2loopback
if [[ $? == 0 ]]; then
sudo modprobe v4l2loopback video_nr=2 devices=1 card_label="OBS Virtual Camera"
if [[ $? == 0 ]]; then
$obs_cmd --startvirtualcam & disown
else
echo "Cannot run modprobe. Ensure v4l2loopback-dkms is installed and try again"
exit 1
fi
else
echo "Cannot remove v4l2loopback device"
exit 2
fi

11
scripts/fix-repo-vivaldi.sh Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env bash
# https://gist.github.com/pkorpine/16fcdbe070222cf1d99e67cf542e60c2
sudo rm -rf /etc/apt/sources.list.d/vivaldi*
cd /tmp
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor > packages.vivaldi.gpg
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

12
scripts/fix-repo-vscode.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/usr/bin/env bash
# https://code.visualstudio.com/docs/setup/linux
sudo rm -rf /etc/apt/sources.list.d/vscode*
cd /tmp
sudo apt install wget gpg apt-transport-https
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" |sudo tee /etc/apt/sources.list.d/vscode.list > /dev/null
rm -f packages.microsoft.gpg
sudo apt update

57
scripts/free-space.sh Executable file
View File

@@ -0,0 +1,57 @@
#!/usr/bin/env bash
# Очистка места на диске
# https://gist.github.com/anthonyaxenov/02c00c965be4eb5bb163a153abdf4c2b
# https://itsfoss.com/free-up-space-ubuntu-linux/
echo
echo
df -hx tmpfs
echo
echo
echo "[1/5] Removing apt caches and unused packages"
echo
sudo apt autoremove --purge
sudo apt autoclean
sudo apt clean
echo
echo "[2/5] Removing old system logs"
echo
sudo journalctl --vacuum-time=1d
sudo rm -rf /var/log/journal/user-*@*
sudo rm -rf /var/log/journal/system*@*
sudo rm /var/log/{syslog,dmesg,btmp}.*
sudo rm /var/log/{auth,dpkg,kern,alternatives,dmesg}.log.*
echo
echo "[3/5] Cleaning user trash and thumbnails"
echo
rm -rf ~/.local/share/Trash/files/*
rm -rf ~/.cache/thumbnails/*
echo
echo "[4/5] Cleaning out dangling docker objects"
echo
docker system prune -f
# docker system prune -af
echo
echo "[5/5] Removing disabled unused snaps"
echo
sudo snap list --all \
| awk '/disabled/{print $1, $3}' \
| while read snapname revision; do
sudo snap remove "$snapname" --revision="$revision"
done
echo
echo
df -hx tmpfs
echo
echo

Some files were not shown because too many files have changed in this diff Show More