Compare commits
35 Commits
cbb493b5c4
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 549b420df2 | |||
|
edf76874fc
|
|||
|
95ad6b0c6a
|
|||
|
ff36975eb7
|
|||
|
5ae19346d6
|
|||
|
53ee621747
|
|||
|
dd339f2939
|
|||
|
e0fbdf852e
|
|||
|
b5983ed308
|
|||
|
f39af6d446
|
|||
|
8fe3d112ba
|
|||
|
4c81bcea73
|
|||
|
5623d08d85
|
|||
|
0a369efe1b
|
|||
|
1640ebfb45
|
|||
|
d2c561fc28
|
|||
|
a920e48422
|
|||
|
0ed07de2d2
|
|||
|
abad965e9a
|
|||
|
b5b0140e34
|
|||
|
5d75b6f79e
|
|||
|
87fd722509
|
|||
|
eaacecd87a
|
|||
|
4c57a180ac
|
|||
|
96bd945ef2
|
|||
|
49fd27d3be
|
|||
|
3c9f1d71cb
|
|||
|
3a226ed5bb
|
|||
|
fe83b3eb25
|
|||
|
a34dda20c7
|
|||
|
021db1064e
|
|||
|
b70b89433b
|
|||
|
8531543982
|
|||
|
e05b47ae52
|
|||
|
e9a6f4ddda
|
47
Makefile
47
Makefile
@@ -1,4 +1,4 @@
|
|||||||
# Autogenerated at 09.01.2025 15:37 using ./gen-makefile
|
# Autogenerated at 10.07.2025 23:45 using ./gen-makefile
|
||||||
.DEFAULT_GOAL := help
|
.DEFAULT_GOAL := help
|
||||||
|
|
||||||
#===============================================
|
#===============================================
|
||||||
@@ -21,6 +21,10 @@ canon-mg2500:
|
|||||||
chrome:
|
chrome:
|
||||||
@./install/chrome
|
@./install/chrome
|
||||||
|
|
||||||
|
##clamav: ClamAV (WIP)
|
||||||
|
clamav:
|
||||||
|
@./install/clamav
|
||||||
|
|
||||||
##composer: Install composer (latest)
|
##composer: Install composer (latest)
|
||||||
composer:
|
composer:
|
||||||
@./install/composer
|
@./install/composer
|
||||||
@@ -45,9 +49,9 @@ droidcam-obs:
|
|||||||
flameshot:
|
flameshot:
|
||||||
@./install/flameshot
|
@./install/flameshot
|
||||||
|
|
||||||
##frkn: Install Wireguard + FRKN
|
##frkn.deprecated: Install Wireguard + FRKN
|
||||||
frkn:
|
frkn.deprecated:
|
||||||
@./install/frkn
|
@./install/frkn.deprecated
|
||||||
|
|
||||||
##git: Install git (latest)
|
##git: Install git (latest)
|
||||||
git:
|
git:
|
||||||
@@ -81,15 +85,11 @@ kde-file-templates:
|
|||||||
kde-portal:
|
kde-portal:
|
||||||
@./install/kde-portal
|
@./install/kde-portal
|
||||||
|
|
||||||
##lazynvim: <no description>
|
|
||||||
lazynvim:
|
|
||||||
@./install/lazynvim
|
|
||||||
|
|
||||||
##libreoffice: Install libreoffice
|
##libreoffice: Install libreoffice
|
||||||
libreoffice:
|
libreoffice:
|
||||||
@./install/libreoffice
|
@./install/libreoffice
|
||||||
|
|
||||||
##lite-xl: Install lite-xl
|
##lite-xl: Install lite-xl v2.1.7
|
||||||
lite-xl:
|
lite-xl:
|
||||||
@./install/lite-xl
|
@./install/lite-xl
|
||||||
|
|
||||||
@@ -105,6 +105,10 @@ nodejs:
|
|||||||
ntfy:
|
ntfy:
|
||||||
@./install/ntfy
|
@./install/ntfy
|
||||||
|
|
||||||
|
##nvim: Install nvim + lazyvim
|
||||||
|
nvim:
|
||||||
|
@./install/nvim
|
||||||
|
|
||||||
##obs-studio: Install obs-studio (latest snap)
|
##obs-studio: Install obs-studio (latest snap)
|
||||||
obs-studio:
|
obs-studio:
|
||||||
@./install/obs-studio
|
@./install/obs-studio
|
||||||
@@ -129,7 +133,7 @@ papirus:
|
|||||||
pgsql:
|
pgsql:
|
||||||
@./install/pgsql
|
@./install/pgsql
|
||||||
|
|
||||||
##php: Install php v8.3 + ppa
|
##php: Install php v8.4
|
||||||
php:
|
php:
|
||||||
@./install/php
|
@./install/php
|
||||||
|
|
||||||
@@ -165,10 +169,14 @@ postman:
|
|||||||
qt5:
|
qt5:
|
||||||
@./install/qt5
|
@./install/qt5
|
||||||
|
|
||||||
##rustdesk: Install rustdesk client v1.1.9 (deb)
|
##rustdesk: Install rustdesk client (flatpak)
|
||||||
rustdesk:
|
rustdesk:
|
||||||
@./install/rustdesk
|
@./install/rustdesk
|
||||||
|
|
||||||
|
##rustdesk-deb: Install rustdesk client v1.4.0 (deb)
|
||||||
|
rustdesk-deb:
|
||||||
|
@./install/rustdesk-deb
|
||||||
|
|
||||||
##snap: Install bunch of software from snap
|
##snap: Install bunch of software from snap
|
||||||
snap:
|
snap:
|
||||||
@./install/snap
|
@./install/snap
|
||||||
@@ -181,6 +189,10 @@ sublimemerge:
|
|||||||
sublimetext:
|
sublimetext:
|
||||||
@./install/sublimetext
|
@./install/sublimetext
|
||||||
|
|
||||||
|
##suld: Samsung Unified Linux Driver repo
|
||||||
|
suld:
|
||||||
|
@./install/suld
|
||||||
|
|
||||||
##syncthing: Install syncthing (latest) + ppa
|
##syncthing: Install syncthing (latest) + ppa
|
||||||
syncthing:
|
syncthing:
|
||||||
@./install/syncthing
|
@./install/syncthing
|
||||||
@@ -205,7 +217,7 @@ vivaldi:
|
|||||||
vscode:
|
vscode:
|
||||||
@./install/vscode
|
@./install/vscode
|
||||||
|
|
||||||
##wine: Install wine (latest) + ppa (focal)
|
##wine: Install wine (latest) + ppa
|
||||||
wine:
|
wine:
|
||||||
@./install/wine
|
@./install/wine
|
||||||
|
|
||||||
@@ -230,9 +242,6 @@ zsh:
|
|||||||
# Scripts listed in ./packs
|
# Scripts listed in ./packs
|
||||||
#===============================================
|
#===============================================
|
||||||
|
|
||||||
##flameshot: [TODO] [PACK] qt5 + flameshot from source
|
|
||||||
flameshot: qt5 flameshot-build
|
|
||||||
|
|
||||||
##lamp: [PACK] Apache + php + mariadb
|
##lamp: [PACK] Apache + php + mariadb
|
||||||
lamp: apache phpstack mariadb
|
lamp: apache phpstack mariadb
|
||||||
|
|
||||||
@@ -244,8 +253,8 @@ omz: zsh omz-clean omz-fancy
|
|||||||
chsh -s /usr/bin/zsh
|
chsh -s /usr/bin/zsh
|
||||||
@exec zsh
|
@exec zsh
|
||||||
|
|
||||||
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd)
|
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, phpmd)
|
||||||
phptools: composer php-psalm php-spx phpcs phpmd phpstan phpunit
|
phptools: composer php-psalm phpcs phpmd phpstan phpunit
|
||||||
|
|
||||||
##phpstack: [PACK] Install full php stack with tooling
|
##phpstack: [PACK] Install full php stack with tooling
|
||||||
phpstack: php phptools
|
phpstack: php phptools
|
||||||
@@ -310,6 +319,10 @@ phpstack: php phptools
|
|||||||
/vivaldi:
|
/vivaldi:
|
||||||
@./uninstall/vivaldi
|
@./uninstall/vivaldi
|
||||||
|
|
||||||
|
##/wine: Uninstall wine
|
||||||
|
/wine:
|
||||||
|
@./uninstall/wine
|
||||||
|
|
||||||
#===============================================
|
#===============================================
|
||||||
# Service goals
|
# Service goals
|
||||||
#===============================================
|
#===============================================
|
||||||
|
|||||||
@@ -16,13 +16,13 @@ If some dependecies are missed for some of these scripts it is enougth to run `.
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# with git
|
# with git
|
||||||
git clone git@git.axenov.dev:anthony/my-env.git --depth=1 --single-branch
|
git clone git@git.axenov.dev:anthony/shell.git --depth=1 --single-branch
|
||||||
|
|
||||||
# without git
|
# without git
|
||||||
wget -qO - https://git.axenov.dev/anthony/my-env/archive/master.tar.gz | tar -zxf -
|
wget -qO - https://git.axenov.dev/anthony/shell/archive/master.tar.gz | tar -zxf -
|
||||||
|
|
||||||
# get full list of `make` goals
|
# get full list of `make` goals
|
||||||
cd my-env && make
|
cd shell && make
|
||||||
```
|
```
|
||||||
|
|
||||||
## How to add my script?
|
## How to add my script?
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
[alias]
|
||||||
a = "add"
|
a = "add"
|
||||||
aa = "add --all" # add all unstaged into index
|
aa = "add --all" # add all unstaged into index
|
||||||
aliases = "config --get-regexp '^alias.*'" # show all aliases
|
aliases = "config --get-regexp '^alias.*'" # show all aliases
|
||||||
@@ -119,6 +120,7 @@ undo = "uncommit"
|
|||||||
unstage = "reset HEAD" # staged file => unstaged
|
unstage = "reset HEAD" # staged file => unstaged
|
||||||
upstream-branch = "!git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)"
|
upstream-branch = "!git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)"
|
||||||
user = "config --local --get-regexp '^user'" # show local user settings (in current repo)
|
user = "config --local --get-regexp '^user'" # show local user settings (in current repo)
|
||||||
|
vacuum="!git reflog expire --expire-unreachable=now --all; git gc --prune=now"
|
||||||
whoami = "user"
|
whoami = "user"
|
||||||
wip = "!git add . && git commit -am 'WIP'"
|
wip = "!git add . && git commit -am 'WIP'"
|
||||||
wipa = "!git add . && git commit --amend -am 'WIP'"
|
wipa = "!git add . && git commit --amend -am 'WIP'"
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ set -oe pipefail
|
|||||||
|
|
||||||
__root__=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
|
__root__=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
|
||||||
source $__root__/helpers/io.sh || exit 255
|
source $__root__/helpers/io.sh || exit 255
|
||||||
|
source $__root__/helpers/git.sh || exit 255
|
||||||
source $__root__/helpers/basic.sh || exit 255
|
source $__root__/helpers/basic.sh || exit 255
|
||||||
source $__root__/helpers/debug.sh || exit 255
|
source $__root__/helpers/debug.sh || exit 255
|
||||||
source $__root__/helpers/packages.sh || exit 255
|
source $__root__/helpers/packages.sh || exit 255
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ open_url() {
|
|||||||
# unpack .tar.gz file $1 into path $2
|
# unpack .tar.gz file $1 into path $2
|
||||||
unpack_targz() {
|
unpack_targz() {
|
||||||
require tar
|
require tar
|
||||||
tar -xzf "$1" -C "$2"
|
tar -xzvf "$1" -C "$2"
|
||||||
}
|
}
|
||||||
|
|
||||||
# make soft symbolic link of path $1 to path $2
|
# make soft symbolic link of path $1 to path $2
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
_dir=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
|
_dir=$( dirname $(readlink -e -- "${BASH_SOURCE}"))
|
||||||
source $_dir/io.sh || exit 255
|
source "$_dir/io.sh" || exit 255
|
||||||
source $_dir/basic.sh || exit 255
|
source "$_dir/basic.sh" || exit 255
|
||||||
source $_dir/pkg.sh || exit 255
|
source "$_dir/packages.sh" || exit 255
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# Shorthands for git
|
# Shorthands for git
|
||||||
@@ -10,7 +10,7 @@ source $_dir/pkg.sh || exit 255
|
|||||||
|
|
||||||
git.clone_quick() {
|
git.clone_quick() {
|
||||||
require git
|
require git
|
||||||
git clone --depth=1 --single-branch $*
|
git clone --depth=1 --single-branch "$@"
|
||||||
}
|
}
|
||||||
|
|
||||||
git.is_repo() {
|
git.is_repo() {
|
||||||
@@ -64,12 +64,12 @@ git.reset() {
|
|||||||
|
|
||||||
git.clone() {
|
git.clone() {
|
||||||
require git
|
require git
|
||||||
git clone $* 2>&1
|
git clone "$*" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
git.co() {
|
git.co() {
|
||||||
require git
|
require git
|
||||||
git checkout $* 2>&1
|
git checkout "$*" 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
git.is_it_current_branch() {
|
git.is_it_current_branch() {
|
||||||
|
|||||||
@@ -25,10 +25,10 @@ php "$HOME/install/other/composer-setup.php" \
|
|||||||
--filename="composer"
|
--filename="composer"
|
||||||
|
|
||||||
COMPOSER_GLOBAL_HOME="$($HOME/.local/bin/composer config -g home)"
|
COMPOSER_GLOBAL_HOME="$($HOME/.local/bin/composer config -g home)"
|
||||||
NEWPATH="export PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
NEWPATH="PATH=\"$COMPOSER_GLOBAL_HOME/vendor/bin:\${PATH}\""
|
||||||
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
cat "$HOME/.profile" | grep -qoh "$NEWPATH" || {
|
||||||
$NEWPATH
|
export "$NEWPATH"
|
||||||
echo "$NEWPATH" >> "$HOME/.profile"
|
echo "export $NEWPATH" >> "$HOME/.profile"
|
||||||
}
|
}
|
||||||
|
|
||||||
source "$HOME/.profile"
|
source "$HOME/.profile"
|
||||||
|
|||||||
@@ -4,12 +4,51 @@ source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 25
|
|||||||
|
|
||||||
title
|
title
|
||||||
|
|
||||||
sudo apt install -y --autoremove flameshot && \
|
# https://github.com/flameshot-org/flameshot?tab=readme-ov-file#compilation
|
||||||
sudo systemctl restart flameshot
|
# 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 ] && {
|
[ $? = 0 ] && {
|
||||||
echo
|
echo
|
||||||
success "flameshot installed!"
|
success "flameshot installed!"
|
||||||
flameshot -v
|
# /opt/flameshot/flameshot -v
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
##makedesc: Install Wireguard + FRKN
|
##makedesc: Install Wireguard + FRKN (deprecated)
|
||||||
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
|
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
|
||||||
|
|
||||||
# https://frkn.org/ru/installation
|
# https://frkn.org/ru/installation
|
||||||
@@ -11,7 +11,7 @@ cd "$HOME/install/frkn"
|
|||||||
|
|
||||||
apt_install wireguard jq
|
apt_install wireguard jq
|
||||||
|
|
||||||
countries=(uk ru nl nl2 ch)
|
countries=(jp nl tr at ru se)
|
||||||
for idx in ${!countries[@]}; do
|
for idx in ${!countries[@]}; do
|
||||||
country=${countries[idx]}
|
country=${countries[idx]}
|
||||||
info "Downloading config for $country ($(expr $idx + 1)/${#countries[@]})"
|
info "Downloading config for $country ($(expr $idx + 1)/${#countries[@]})"
|
||||||
|
|||||||
@@ -1,64 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
|
|
||||||
|
|
||||||
set -eo pipefail
|
|
||||||
trap ontrap SIGINT SIGTERM SIGSTOP
|
|
||||||
|
|
||||||
ontrap() {
|
|
||||||
echo
|
|
||||||
echo "[!] Interrupted"
|
|
||||||
exit
|
|
||||||
}
|
|
||||||
|
|
||||||
[ -z "$1" ] && version=0.10.1 || version="$1"
|
|
||||||
|
|
||||||
filedir="$HOME/install/neovim-$version"
|
|
||||||
filename="nvim-linux64.tar.gz"
|
|
||||||
filepath="$filedir/$filename"
|
|
||||||
configdir="$HOME/.config/nvim"
|
|
||||||
localdir="$HOME/.local"
|
|
||||||
|
|
||||||
echo "[*] Installing neovim v$version"
|
|
||||||
|
|
||||||
if [ -d $configdir ]; then
|
|
||||||
mv $configdir "$configdir.bak-$(date +'%Y%m%d_%H%M%S')"
|
|
||||||
fi
|
|
||||||
|
|
||||||
mkdir -p $filedir $configdir $localdir/{bin,lib,share}
|
|
||||||
|
|
||||||
if [ ! -f $filepath ]; then
|
|
||||||
echo "[*] Downloading to $filepath..."
|
|
||||||
wget -q https://github.com/neovim/neovim/releases/download/v$version/nvim-linux64.tar.gz \
|
|
||||||
-O $filepath \
|
|
||||||
--show-progress
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "[*] Unpacking: $filepath..."
|
|
||||||
tar -zxf $filepath -C $filedir
|
|
||||||
cp -rf $filedir/nvim-linux64/bin/nvim $localdir/bin/
|
|
||||||
cp -rf $filedir/nvim-linux64/lib/nvim $localdir/lib/
|
|
||||||
cp -rf $filedir/nvim-linux64/share $localdir/share
|
|
||||||
rm -rf $filedir/nvim-linux64
|
|
||||||
|
|
||||||
echo "[*] Reinit git repo..."
|
|
||||||
git clone https://github.com/LazyVim/starter \
|
|
||||||
$configdir \
|
|
||||||
--depth=1 \
|
|
||||||
--single-branch
|
|
||||||
cd $configdir
|
|
||||||
rm -rf .git
|
|
||||||
git init -q
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,43 +1,45 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
##makedesc: Install lite-xl
|
##makedesc: Install lite-xl v2.1.7
|
||||||
|
|
||||||
# https://github.com/lite-xl/lite-xl/releases
|
# https://github.com/lite-xl/lite-xl/releases
|
||||||
# https://lite-xl.com/en/documentation/build
|
# https://lite-xl.com/setup/getting-started/
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo "Installing lite-xl v2.1.0..."
|
echo "Installing lite-xl v2.1.7..."
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
tar_url="https://github.com/lite-xl/lite-xl/releases/download/v2.1.0/lite-xl-v2.1.0-addons-linux-x86_64-portable.tar.gz"
|
tar_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"
|
||||||
tar_filepath="/tmp/lite-xl.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"
|
untar_dir="$HOME/install"
|
||||||
untar_subdir="$untar_dir/lite-xl"
|
|
||||||
dest_bin_dir="$HOME/.local/bin"
|
|
||||||
dest_config_dir="$HOME/.config/lite-xl"
|
|
||||||
dest_share_dir="$HOME/.local/share"
|
|
||||||
dest_share_subdir="$dest_share_dir/lite-xl"
|
|
||||||
|
|
||||||
wget "$tar_url" -O "$tar_filepath"
|
rm -rf \
|
||||||
|
"$HOME/.local/bin/lpm" \
|
||||||
|
"$HOME/install/lite-xl" \
|
||||||
|
"$HOME/.local/bin/lite-xl" \
|
||||||
|
"$HOME/.local/share/lite-xl"
|
||||||
|
|
||||||
mkdir -vp \
|
mkdir -vp \
|
||||||
"$untar_dir" \
|
"$untar_dir" \
|
||||||
#"$dest_config" \
|
"$HOME/.local/bin" \
|
||||||
"$dest_bin_dir" \
|
"$HOME/.local/share/lite-xl"
|
||||||
"$dest_share_dir"
|
|
||||||
|
|
||||||
tar -xzf "$tar_filepath" -C "$untar_dir"
|
wget "$tar_url" -O "$tar_filepath" && \
|
||||||
mv -fv "$untar_subdir/lite-xl" "$dest_bin_dir/lite-xl"
|
wget "$lpm_url" -O "$HOME/.local/bin/lpm" && \
|
||||||
mv -fvT "$untar_subdir/data" "$dest_share_subdir"
|
chmod +x "$HOME/.local/bin/lpm" && \
|
||||||
rm -fr "$tar_file" "$untar_subdir"
|
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
|
# echo -e "\nexport LITE_SCALE=1 # https://github.com/lite-xl/lite-xl/issues/1173\n" >> $HOME/.profile
|
||||||
cat << EOF > "$dest_share_dir/applications/org.lite_xl.lite_xl.desktop"
|
cat << EOF > "$HOME/.local/share/applications/org.lite_xl.lite_xl.desktop"
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Type=Application
|
Type=Application
|
||||||
Name=Lite XL
|
Name=Lite XL
|
||||||
Comment=A lightweight text editor written in Lua
|
Comment=A lightweight text editor written in Lua
|
||||||
Exec=env LITE_SCALE=1 ${dest_bin_dir}/lite-xl %F
|
Exec=$HOME/.local/bin/lite-xl %F
|
||||||
Icon=lite-xl
|
Icon=lite-xl
|
||||||
Terminal=false
|
Terminal=false
|
||||||
StartupWMClass=lite-xl
|
StartupWMClass=lite-xl
|
||||||
@@ -48,53 +50,6 @@ EOF
|
|||||||
sudo update-desktop-database && \
|
sudo update-desktop-database && \
|
||||||
xdg-desktop-menu forceupdate
|
xdg-desktop-menu forceupdate
|
||||||
|
|
||||||
echo
|
|
||||||
echo "==============================================="
|
|
||||||
echo "Installing lite-xl plugins..."
|
|
||||||
echo "https://github.com/lite-xl/lite-xl-plugins"
|
|
||||||
echo "==============================================="
|
|
||||||
echo
|
|
||||||
|
|
||||||
download_plugin() {
|
|
||||||
echo "- $1"
|
|
||||||
curl -s "https://raw.githubusercontent.com/lite-xl/lite-xl-plugins/master/plugins/$1.lua" \
|
|
||||||
> "$dest_share_subdir/plugins/$1.lua"
|
|
||||||
}
|
|
||||||
|
|
||||||
download_plugin "align_carets"
|
|
||||||
download_plugin "autosaveonfocuslost"
|
|
||||||
download_plugin "bracketmatch"
|
|
||||||
download_plugin "copyfilelocation"
|
|
||||||
download_plugin "dragdropselected"
|
|
||||||
download_plugin "fontconfig"
|
|
||||||
download_plugin "force_syntax"
|
|
||||||
download_plugin "lfautoinsert"
|
|
||||||
download_plugin "markers"
|
|
||||||
download_plugin "memoryusage"
|
|
||||||
download_plugin "minimap"
|
|
||||||
download_plugin "navigate"
|
|
||||||
download_plugin "openselected"
|
|
||||||
download_plugin "restoretabs"
|
|
||||||
download_plugin "smoothcaret"
|
|
||||||
|
|
||||||
# echo "- eofnewline-xl"
|
|
||||||
# curl -s "https://raw.githubusercontent.com/bokunodev/lite_modules/master/plugins/eofnewline-xl.lua" \
|
|
||||||
# > "$dest_share_subdir/plugins/eofnewline-xl.lua"
|
|
||||||
|
|
||||||
echo "- language_env"
|
|
||||||
curl -s "https://raw.githubusercontent.com/anthonyaxenov/lite-xl-env-syntax/master/language_env.lua" \
|
|
||||||
> "$dest_share_subdir/plugins/language_env.lua"
|
|
||||||
|
|
||||||
echo "- language_ignore"
|
|
||||||
curl -s "https://raw.githubusercontent.com/anthonyaxenov/lite-xl-ignore-syntax/master/language_ignore.lua" \
|
|
||||||
> "$dest_share_subdir/plugins/language_ignore.lua"
|
|
||||||
|
|
||||||
# echo "- language-containerfile"
|
|
||||||
# git clone -q "https://github.com/FilBot3/lite-xl-language-containerfile.git" \
|
|
||||||
# "$dest_share_subdir/plugins/language_containerfile"
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Finish!"
|
echo "Finish!"
|
||||||
echo "- $dest_bin_dir/lite-xl"
|
|
||||||
echo "- $dest_share_subdir"
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
33
install/nvim
Executable file
33
install/nvim
Executable file
@@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
##makedesc: Install nvim + lazyvim
|
||||||
|
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
|
||||||
|
|
||||||
|
# https://www.lazyvim.org/installation
|
||||||
|
# https://www.devas.life/effective-neovim-setup-for-web-development-towards-2024/
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
require git
|
||||||
|
|
||||||
|
nvimUrl="https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz"
|
||||||
|
installPath="$HOME/install"
|
||||||
|
installTar="$installPath/nvim.tar.gz"
|
||||||
|
|
||||||
|
[ -d "$HOME/.config/nvim" ] && mv "$HOME"/.config/nvim{,.bak}
|
||||||
|
[ -d "$HOME/.local/share/nvim" ] && mv "$HOME"/.local/share/nvim{,.bak}
|
||||||
|
[ -d "$HOME/.local/state/nvim" ] && mv "$HOME"/.local/state/nvim{,.bak}
|
||||||
|
[ -d "$HOME/.cache/nvim" ] && mv "$HOME"/.cache/nvim{,.bak}
|
||||||
|
|
||||||
|
download "$nvimUrl" "$installTar"
|
||||||
|
unpack_targz "$installTar" "$installPath"
|
||||||
|
|
||||||
|
sudo rm -vrf /opt/nvim
|
||||||
|
sudo mv -v "$installPath/nvim-linux-x86_64" /opt/nvim
|
||||||
|
|
||||||
|
git.clone_quick https://github.com/LazyVim/starter "$HOME/.config/nvim"
|
||||||
|
rm -rf "$HOME/.config/nvim/.git"
|
||||||
|
|
||||||
|
sudo update-desktop-database && \
|
||||||
|
xdg-desktop-menu forceupdate
|
||||||
|
|
||||||
|
# export PATH="$PATH:/opt/nvim-linux-x86_64/bin"
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
##makedesc: Install php v8.3 + ppa
|
##makedesc: Install php v8.4
|
||||||
|
|
||||||
[ $1 ] && PHPVER="$1" || PHPVER="8.3"
|
[ "$1" ] && PHPVER="$1" || PHPVER="8.4"
|
||||||
echo
|
echo
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo "Installing php${PHPVER}..."
|
echo "Installing php${PHPVER}..."
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
|
|
||||||
sudo apt install -y --autoremove \
|
sudo apt install -y --autoremove \
|
||||||
php${PHPVER} \
|
php${PHPVER}-fpm \
|
||||||
|
php${PHPVER}-dev \
|
||||||
php${PHPVER}-apcu \
|
php${PHPVER}-apcu \
|
||||||
php${PHPVER}-bcmath \
|
php${PHPVER}-bcmath \
|
||||||
php${PHPVER}-cli \
|
php${PHPVER}-cli \
|
||||||
@@ -24,6 +24,7 @@ sudo apt install -y --autoremove \
|
|||||||
php${PHPVER}-mysql \
|
php${PHPVER}-mysql \
|
||||||
php${PHPVER}-opcache \
|
php${PHPVER}-opcache \
|
||||||
php${PHPVER}-pgsql \
|
php${PHPVER}-pgsql \
|
||||||
|
php${PHPVER}-simplexml \
|
||||||
php${PHPVER}-soap \
|
php${PHPVER}-soap \
|
||||||
php${PHPVER}-sqlite3 \
|
php${PHPVER}-sqlite3 \
|
||||||
php${PHPVER}-xdebug \
|
php${PHPVER}-xdebug \
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
##makedesc: Install rustdesk client v1.1.9 (deb)
|
##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 "==============================================="
|
echo "==============================================="
|
||||||
echo "Installing rustdesk v$RDVER..."
|
echo "Installing rustdesk v$RDVER..."
|
||||||
@@ -12,9 +12,13 @@ echo
|
|||||||
|
|
||||||
deb_path="$HOME/install"
|
deb_path="$HOME/install"
|
||||||
deb_name="rustdesk-$RDVER.deb"
|
deb_name="rustdesk-$RDVER.deb"
|
||||||
mkdir -p $deb_path
|
mkdir -p "$deb_path"
|
||||||
deb="$deb_path/$deb_name"
|
deb="$deb_path/$deb_name"
|
||||||
|
|
||||||
sudo apt install -y libxdo3 python3-pip && \
|
sudo apt install -y libxdo3 python3-pip
|
||||||
wget "https://github.com/rustdesk/rustdesk/releases/download/$RDVER/$deb_name" -O $deb && \
|
wget "https://github.com/rustdesk/rustdesk/releases/download/$RDVER/$deb_name" -O "$deb"
|
||||||
sudo dpkg -i $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
|
||||||
|
|||||||
@@ -3,29 +3,32 @@
|
|||||||
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
|
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
|
||||||
|
|
||||||
# https://www.sublimetext.com/download
|
# https://www.sublimetext.com/download
|
||||||
# https://gist.github.com/skoqaq/3f3e8f28e23c881143cef9cf49d821ff
|
# https://gist.axenov.dev/anthony/sublime
|
||||||
|
# https://gist.axenov.dev/anthony/sublime2
|
||||||
# https://gist.github.com/lugrus2000/1fc55158b87f94d799392a6dd1ac0ce2
|
# https://gist.github.com/lugrus2000/1fc55158b87f94d799392a6dd1ac0ce2
|
||||||
# https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47
|
# https://gist.github.com/maboloshi/feaa63c35f4c2baab24c9aaf9b3f4e47
|
||||||
|
|
||||||
[ "$1" ] && STVER="$1" || STVER='4189'
|
[ "$1" ] && STVER="$1" || STVER='4200'
|
||||||
|
|
||||||
title
|
title
|
||||||
|
|
||||||
mkdir -p "$HOME/install"
|
mkdir -p "$HOME/install"
|
||||||
DEB_PATH="$HOME/install/sublime-text_build-${SMVER}_amd64.deb"
|
DEB_PATH="$HOME/install/sublime-text_build-${STVER}_amd64.deb"
|
||||||
BIN_PATH="/opt/sublime_text/sublime_text"
|
BIN_PATH="/opt/sublime_text/sublime_text"
|
||||||
|
|
||||||
if [[ ! -f "$DEB_PATH" ]]; then
|
if [[ ! -f "$DEB_PATH" ]]; then
|
||||||
download https://download.sublimetext.com/sublime-text_build-${STVER}_amd64.deb "$DEB_PATH"
|
download "https://download.sublimetext.com/sublime-text_build-${STVER}_amd64.deb" "$DEB_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo dpkg -i "$DEB_PATH"
|
sudo dpkg -i "$DEB_PATH"
|
||||||
sudo cp -f $BIN_PATH $BIN_PATH.old
|
sudo cp -f "$BIN_PATH" "$BIN_PATH.old"
|
||||||
|
|
||||||
if [[ $STVER = 4169 ]]; then
|
if [[ $STVER = 4169 ]]; then
|
||||||
echo "00489f39: c640 0501 4885 c9" | sudo xxd -r - $BIN_PATH
|
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
|
else
|
||||||
sudo sed -i 's#\x80\x79\x05\x00\x0F\x94\xC2#\xC6\x41\x05\x01\xB2\x00\x90#' $BIN_PATH
|
sudo sed -i 's#\x80\x79\x05\x00\x0F\x94\xC2#\xC6\x41\x05\x01\xB2\x00\x90#' "$BIN_PATH"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
|
|||||||
20
install/suld
Executable file
20
install/suld
Executable 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/"
|
||||||
@@ -7,5 +7,7 @@ echo "Installing ulauncher (latest) + ppa..."
|
|||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
sudo add-apt-repository -y ppa:agornostal/ulauncher
|
sudo add-apt-repository universe -y
|
||||||
sudo apt install -y --autoremove ulauncher
|
sudo add-apt-repository ppa:agornostal/ulauncher -y
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install ulauncher
|
||||||
|
|||||||
@@ -11,11 +11,9 @@ echo "Installing Vivaldi + ppa..."
|
|||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub \
|
wget -qO- https://repo.vivaldi.com/archive/linux_signing_key.pub | gpg --dearmor > packages.vivaldi.gpg
|
||||||
| gpg --dearmor \
|
sudo install -o root -g root -m 644 packages.vivaldi.gpg /etc/apt/trusted.gpg.d
|
||||||
| sudo dd of=/usr/share/keyrings/vivaldi-browser.gpg
|
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
|
||||||
echo "deb [signed-by=/usr/share/keyrings/vivaldi-browser.gpg arch=$(dpkg --print-architecture)] https://repo.vivaldi.com/archive/deb/ stable main" \
|
|
||||||
| sudo dd of=/etc/apt/sources.list.d/vivaldi-archive.list
|
|
||||||
|
|
||||||
sudo apt update && sudo apt install vivaldi-stable
|
sudo apt update && sudo apt install vivaldi-stable
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
##makedesc: Install wine (latest) + ppa (focal)
|
##makedesc: Install wine (latest) + ppa
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
@@ -9,6 +9,6 @@ echo
|
|||||||
|
|
||||||
sudo dpkg --add-architecture i386
|
sudo dpkg --add-architecture i386
|
||||||
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
|
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
|
||||||
sudo add-apt-repository -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
|
sudo apt install -y --autoremove winehq-stable
|
||||||
wine --version
|
wine --version
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
##flameshot: [TODO] [PACK] qt5 + flameshot from source
|
|
||||||
flameshot: qt5 flameshot-build
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, php-spx, phpmd)
|
##phptools: [PACK] Install only php tooling (composer, phpunit, psalm, phpcs, php-cs-fixer, phpmd)
|
||||||
phptools: composer php-psalm php-spx phpcs phpmd phpstan phpunit
|
phptools: composer php-psalm phpcs phpmd phpstan phpunit
|
||||||
|
|||||||
@@ -1,19 +1,6 @@
|
|||||||
# Shell scripts
|
# Shell-скрипты
|
||||||
|
|
||||||
## Russian
|
|
||||||
|
|
||||||
Эти скрипты я писал в разное время для решения разных задач.
|
Эти скрипты я писал в разное время для решения разных задач.
|
||||||
Чтобы они не растерялись по репозиториям и носителям, я решил собрать их здесь в одну кучу.
|
Чтобы они не растерялись по репозиториям и носителям, я решил собрать их здесь в одну кучу.
|
||||||
|
|
||||||
Я всегда использую Ubuntu в качестве своих настольных и серверных ОС, поэтому все эти скрипты писались и использовались в этих средах с версий 18.*.
|
Я всегда использую Ubuntu в качестве своих настольных и серверных ОС, поэтому все эти скрипты писались и использовались в этих средах с версий 18.*.
|
||||||
|
|
||||||
Многие скрипты зависимы от [io.sh](/io.sh).
|
|
||||||
|
|
||||||
## English
|
|
||||||
|
|
||||||
These scripts were written at different times to solve different my own problems.
|
|
||||||
I decided to collect them here in a heap so that they are not lost in repositories and media.
|
|
||||||
|
|
||||||
I always use Ubuntu as my desktop and server OS, so all these scripts has been written and used in these environments since version 18.*.
|
|
||||||
|
|
||||||
Many scripts depending on [io.sh](/io.sh).
|
|
||||||
|
|||||||
5
tools/disable-ipv6.sh
Executable file
5
tools/disable-ipv6.sh
Executable 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"
|
||||||
11
tools/display-rotate.sh
Executable file
11
tools/display-rotate.sh
Executable 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-0'
|
||||||
|
DIRECTION="$1" # (left|right|normal|inverted)
|
||||||
|
kscreen-doctor "output.$OUTPUT.rotation.$DIRECTION"
|
||||||
47
tools/docker-volume-snapshot.sh
Normal file
47
tools/docker-volume-snapshot.sh
Normal 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
|
||||||
3
tools/duckdns/.env.example
Normal file
3
tools/duckdns/.env.example
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
DUCK_TOKEN=
|
||||||
|
DUCK_DOMAINS=
|
||||||
|
DUCK_IP=
|
||||||
2
tools/duckdns/.gitignore
vendored
Normal file
2
tools/duckdns/.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
.env
|
||||||
|
*.log
|
||||||
9
tools/duckdns/install.sh
Executable file
9
tools/duckdns/install.sh
Executable 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"
|
||||||
3
tools/duckdns/uninstall.sh
Executable file
3
tools/duckdns/uninstall.sh
Executable file
@@ -0,0 +1,3 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
( crontab -l | grep -v -F "duckdns" ) | crontab -
|
||||||
30
tools/duckdns/update.sh
Executable file
30
tools/duckdns/update.sh
Executable 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"
|
||||||
11
tools/fix-repo-vivaldi.sh
Executable file
11
tools/fix-repo-vivaldi.sh
Executable 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
tools/fix-repo-vscode.sh
Executable file
12
tools/fix-repo-vscode.sh
Executable 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
|
||||||
31
tools/make-swapfile.sh
Executable file
31
tools/make-swapfile.sh
Executable file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -exo pipefail
|
||||||
|
|
||||||
|
# https://www.linode.com/docs/guides/how-to-increase-swap-space-in-ubuntu/
|
||||||
|
# https://help.ubuntu.com/community/SwapFaq
|
||||||
|
|
||||||
|
sudo swapon --show
|
||||||
|
free -h
|
||||||
|
df -h
|
||||||
|
|
||||||
|
if [ -f /swapfile ]; then
|
||||||
|
set +x
|
||||||
|
echo "Already exists"
|
||||||
|
exit 1
|
||||||
|
fi;
|
||||||
|
|
||||||
|
sudo fallocate -l 1G /swapfile
|
||||||
|
sudo chmod 600 /swapfile
|
||||||
|
sudo mkswap /swapfile
|
||||||
|
sudo swapon /swapfile
|
||||||
|
|
||||||
|
sudo swapon --show
|
||||||
|
free -h
|
||||||
|
df -h
|
||||||
|
|
||||||
|
sudo cp /etc/fstab /etc/fstab.bak
|
||||||
|
echo "/swapfile swap swap defaults 0 0" | sudo tee -a /etc/fstab
|
||||||
|
sudo sysctl vm.swappiness=50
|
||||||
|
echo "vm.swappiness=50" | sudo tee -a /etc/fstab
|
||||||
|
|
||||||
|
sudo swapon --show
|
||||||
@@ -2,23 +2,11 @@
|
|||||||
# https://dev.to/chefgs/upgrading-an-end-of-life-eol-ubuntu-os-to-lts-version-3a36
|
# https://dev.to/chefgs/upgrading-an-end-of-life-eol-ubuntu-os-to-lts-version-3a36
|
||||||
# https://changelogs.ubuntu.com/meta-release
|
# https://changelogs.ubuntu.com/meta-release
|
||||||
|
|
||||||
installed() {
|
# shellcheck disable=SC1091
|
||||||
command -v "$1" >/dev/null 2>&1
|
|
||||||
}
|
|
||||||
|
|
||||||
# sudo software-properties-qt (переключиться с LTS на нормальные релизы)
|
|
||||||
# sudo aptitude install update-manager-core update-manager
|
|
||||||
# sudo apt upgrade --autoremove -y
|
|
||||||
# installed pkcon && sudo pkcon update --autoremove -y
|
|
||||||
# sudo apt dist-upgrade
|
|
||||||
# sudo apt install update-manager-core
|
|
||||||
# sudo do-release-upgrade -p
|
|
||||||
|
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
|
|
||||||
echo "Loading..."
|
echo "Loading..."
|
||||||
|
mapfile -t codenames < <(curl -s https://changelogs.ubuntu.com/meta-release | grep -oP '(?<=Dist:\s).*')
|
||||||
IFS=$'\n' codenames=($(curl -s https://changelogs.ubuntu.com/meta-release | grep -xP "^Dist:\s[\w]+$" | sed "s/Dist: //" ))
|
|
||||||
thisCodename="$VERSION_CODENAME"
|
thisCodename="$VERSION_CODENAME"
|
||||||
for idx in "${!codenames[@]}"; do
|
for idx in "${!codenames[@]}"; do
|
||||||
if [ "${codenames[idx]}" = "$thisCodename" ]; then
|
if [ "${codenames[idx]}" = "$thisCodename" ]; then
|
||||||
@@ -26,7 +14,7 @@ for idx in "${!codenames[@]}"; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
targetDownloadPath="`pwd`/upgrade-$nextCodename"
|
targetDownloadPath="$(pwd)/upgrade-$nextCodename"
|
||||||
targetToolPath="$targetDownloadPath/unpacked"
|
targetToolPath="$targetDownloadPath/unpacked"
|
||||||
targetToolFile="$targetDownloadPath/$nextCodename.tar.gz"
|
targetToolFile="$targetDownloadPath/$nextCodename.tar.gz"
|
||||||
|
|
||||||
@@ -38,12 +26,14 @@ rm -rf "$targetToolPath"
|
|||||||
mkdir -p "$targetToolPath"
|
mkdir -p "$targetToolPath"
|
||||||
|
|
||||||
echo "Downloading..."
|
echo "Downloading..."
|
||||||
cd "$targetDownloadPath"
|
cd "$targetDownloadPath" || exit 1
|
||||||
wget "http://archive.ubuntu.com/ubuntu/dists/${nextCodename}-updates/main/dist-upgrader-all/current/${nextCodename}.tar.gz"
|
wget "http://archive.ubuntu.com/ubuntu/dists/${nextCodename}-updates/main/dist-upgrader-all/current/${nextCodename}.tar.gz"
|
||||||
|
|
||||||
echo "Unpacking..."
|
echo "Unpacking..."
|
||||||
tar -xaf "$targetToolFile" -C "$targetToolPath"
|
tar -xaf "$targetToolFile" -C "$targetToolPath"
|
||||||
|
|
||||||
echo "Starting..."
|
echo "Starting..."
|
||||||
cd unpacked
|
cd ./unpacked || exit 1
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
sudo ./$nextCodename
|
sudo ./$nextCodename
|
||||||
@@ -29,4 +29,5 @@ apt install -y \
|
|||||||
mariadb-server \
|
mariadb-server \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
nginx \
|
nginx \
|
||||||
certbot
|
certbot \
|
||||||
|
python3-certbot-nginx
|
||||||
@@ -41,13 +41,6 @@ sudo apt install -y \
|
|||||||
notify-osd \
|
notify-osd \
|
||||||
fonts-open-sans \
|
fonts-open-sans \
|
||||||
libnotify-bin \
|
libnotify-bin \
|
||||||
gnome-software \
|
|
||||||
gnome-software-plugin-flatpak \
|
|
||||||
gnome-software-plugin-snap \
|
|
||||||
terminator \
|
|
||||||
geoclue-2.0 \
|
|
||||||
redshift \
|
|
||||||
redshift-gtk \
|
|
||||||
samba \
|
samba \
|
||||||
dkms
|
dkms
|
||||||
|
|
||||||
51
tools/ubuntu/server.sh
Normal file
51
tools/ubuntu/server.sh
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
sudo apt install -y ca-certificates curl && \
|
||||||
|
sudo install -m 0755 -d /etc/apt/keyrings && \
|
||||||
|
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc && \
|
||||||
|
sudo chmod a+r /etc/apt/keyrings/docker.asc && \
|
||||||
|
source /etc/os-release && \
|
||||||
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||||
|
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
|
||||||
|
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null && \
|
||||||
|
sudo apt update && \
|
||||||
|
sudo apt upgrade -y --autoremove && \
|
||||||
|
sudo apt install -y \
|
||||||
|
apt-transport-https \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
git \
|
||||||
|
cmake \
|
||||||
|
curl \
|
||||||
|
dialog \
|
||||||
|
gettext \
|
||||||
|
gnupg \
|
||||||
|
htop \
|
||||||
|
libcurl4-gnutls-dev \
|
||||||
|
libexpat1-dev \
|
||||||
|
libghc-zlib-dev \
|
||||||
|
libssl-dev \
|
||||||
|
lsb-release \
|
||||||
|
make \
|
||||||
|
mc \
|
||||||
|
meld \
|
||||||
|
nano \
|
||||||
|
neofetch \
|
||||||
|
net-tools \
|
||||||
|
nmap \
|
||||||
|
p7zip-full \
|
||||||
|
unzip \
|
||||||
|
ffmpeg \
|
||||||
|
inotify-tools \
|
||||||
|
notify-osd \
|
||||||
|
fonts-open-sans \
|
||||||
|
libnotify-bin \
|
||||||
|
tree \
|
||||||
|
nginx \
|
||||||
|
certbot \
|
||||||
|
python3-certbot-nginx \
|
||||||
|
docker-ce \
|
||||||
|
docker-ce-cli \
|
||||||
|
containerd.io \
|
||||||
|
docker-buildx-plugin \
|
||||||
|
docker-compose-plugin
|
||||||
@@ -7,5 +7,5 @@ echo "Uninstalling omz..."
|
|||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
bash $ZSH/tools/uninstall.sh
|
bash "$ZSH/tools/uninstall.sh"
|
||||||
exec bash
|
exec bash
|
||||||
|
|||||||
11
uninstall/rustdesk
Executable file
11
uninstall/rustdesk
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
##makedesc: Uninstall rustdesk client
|
||||||
|
|
||||||
|
echo
|
||||||
|
echo "==============================================="
|
||||||
|
echo "Uninstalling rustdesk..."
|
||||||
|
echo "==============================================="
|
||||||
|
echo
|
||||||
|
|
||||||
|
sudo dpkg -r rustdesk
|
||||||
|
# flatpak remove -y com.rustdesk.RustDesk
|
||||||
19
uninstall/wine
Executable file
19
uninstall/wine
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
##makedesc: Uninstall wine
|
||||||
|
source "$( dirname $(readlink -e -- "${BASH_SOURCE}"))/../helpers.sh" || exit 255
|
||||||
|
|
||||||
|
title
|
||||||
|
|
||||||
|
sudo apt remove --purge "wine*"
|
||||||
|
rm -rf "$HOME/.wine"
|
||||||
|
rm -f "$HOME/.config/menus/applications-merged/*wine*"
|
||||||
|
rm -rf "$HOME/.local/share/applications/wine"
|
||||||
|
rm -f "$HOME/.local/share/desktop-directories/*wine*"
|
||||||
|
rm -f "$HOME/.local/share/icons/*wine*"
|
||||||
|
|
||||||
|
# !!! dangerous!!!
|
||||||
|
#sudo apt remove --purge wine* *:i386
|
||||||
|
#dpkg --remove-architecture i386
|
||||||
|
|
||||||
|
success "wine removed!"
|
||||||
|
|
||||||
Reference in New Issue
Block a user