Compare commits

..

28 Commits

Author SHA1 Message Date
cd0dc9d988
Фиксы $HOME, $USER + dotfiles 2022-01-09 17:14:25 +08:00
3f4a7b0504
Остатки: удалён common.sh и пр мелочи 2022-01-09 17:07:16 +08:00
89086689c8
Корректировка установщика темы для mate 2022-01-09 17:05:31 +08:00
d6344eb7bd
Удалён io.sh 2022-01-09 17:02:54 +08:00
42aba252cd
Корректировка git 2 2022-01-09 17:02:45 +08:00
9e9dfc7174
Корректировка phpstorm-url-handler 2022-01-09 16:59:08 +08:00
d84e756e07
Корректировка wkhtmltopdf 2022-01-09 16:57:18 +08:00
a8f06130ef
Корректировка composer 2022-01-09 16:56:25 +08:00
551f80ef29
Корректировка golang 2022-01-09 16:53:34 +08:00
d025934894
Корректировка telebit 2022-01-09 16:50:40 +08:00
3b0311d8e7
Корректировка postman 2022-01-09 16:49:08 +08:00
28cf415a22
Корректировка chrome 2022-01-09 16:44:33 +08:00
b05640fc00
Корректировка nvm 2022-01-08 14:40:30 +08:00
a5bf6bac4c
Корректировка zint 2022-01-08 14:35:10 +08:00
c4f4452312
Корректировка pgsql 2022-01-08 14:34:20 +08:00
2356787f31
Корректировка mariadb 2022-01-08 14:32:57 +08:00
2039df23f6
Корректировка oci8 (просто чтобы было) 2022-01-08 14:31:10 +08:00
095689194f
Корректировка php 2022-01-08 14:29:07 +08:00
53681a2e66
Корректировка apache2 2022-01-08 14:27:24 +08:00
924e02d9d9
Корректировка Window AppMenu Applet 2022-01-08 14:25:47 +08:00
d7af364574
Корректировка wine 2022-01-08 14:24:16 +08:00
0cbc526452
Корректировка grub-customizer 2022-01-08 14:23:20 +08:00
8f990dfd3e
Корректировка syncthing 2022-01-08 14:20:48 +08:00
12fe7630b1
Корректировка ulauncher 2022-01-08 14:19:41 +08:00
6d46e36f46
Корректировка docker 2022-01-08 14:18:41 +08:00
3db1b4ba9b
Корректировка git 2022-01-08 14:17:50 +08:00
41b6cfbfb3
Корректировка zsh 2022-01-08 14:15:22 +08:00
de926c6987
Проба без доп.скриптов 2022-01-08 13:26:21 +08:00
35 changed files with 399 additions and 419 deletions

View File

@ -1,23 +1,49 @@
# Окружение рабочего стола
Установщик софта и визуала.
Используется для развёртывания привычной рабочей среды на Ubuntu.
Набор скриптов для развёртывания привычной рабочей среды на Ubuntu.
Для установки всего софта выполнить команду:
## Полная установка
Если установлен `git`
```shell
git clone git@git.anthonyaxenov.ru:anthony/my-env.git --depth=1
cd my-env
sudo ./start.sh
```
Команда обработает все `*.sh`-скрипты из [`/install`](/install) по порядку.
Если весь софт не нужен, то следует обращаться к этим скриптам по отдельности:
Если не установлен `git`
```shell
./install/050-syncthing.sh
wget -qO - http://git.anthonyaxenov.ru/anthony/my-env/archive/master.tar.gz | tar -zxf -
cd my-env
sudo ./start.sh
```
Также можно установить визуальное оформление (**только в среде MATE**):
Скрипт `start.sh` обработает все `*.sh`-скрипты из [`/install`](/install) по порядку.
## Частичная установка
Без полного развёртывания репозитория
```shell
wget -qO - http://git.anthonyaxenov.ru/anthony/my-env/raw/branch/master/install/000-apt.sh | bash
```
После полного развёртывания репозитория (см. полную установку):
```shell
cd my-env
sudo ./install/000-apt.sh
```
## Тема оформления (только MATE)
Также можно установить визуальное оформление:
* тема: [Budgie Desktop Dark Theme](https://www.pling.com/p/1276879)
* икoнки: [Papirus](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/)
* курсоры: [Bridge](https://www.mate-look.org/s/Mate/p/999983/), [Capitaine Cursors](https://www.gnome-look.org/p/1148692/)
```shell
sudo ./theme/install.sh
```

View File

@ -1,83 +1,92 @@
[user]
name = AnthonyAxenov
email = anthonyaxenov@gmail.com
[push]
default = current
name = AnthonyAxenov
email = anthonyaxenov@gmail.com
signingkey =
[core]
editor = nano
autocrlf = input
[commit]
gpgSign = true
[tag]
gpgSign = true
[pull]
default = current
rebase = false
[core]
editor = nano
autocrlf = input
rebase = false
[push]
default = current
[alias]
# общее -----------------------------------------------------------------
st = status #
aliases = config --get-regexp '^alias' # показать список доступных алиасов
diffc = diff --cached # показать дельту staged-файла
co = checkout #
head = log -1 HEAD # показать последний коммит в текущей ветке
# название текущей ветки или тега при detached head:
dehead = "!BR=$(git branch --show-current); if [ -n \"$BR\" ]; then echo $BR; else git describe --contains --all HEAD; fi;"
# ветки -------------------------------------------------------------------
bheads = branch -vv # ветки и их последние коммиты
# br = status -sb # показать название текущей ветки
# branch = branch --list -vv # показать текущую ветку в общем списке локальных веток
#mn = merge --no-ff # слить ветку с принудительным коммитом слияния
brd = branch -D # удалить ветку локально
brod = "!git push origin :"${1}";" # удалить ветку на origin
merged = branch --merged # показать список веток, слитых в текущую
review = "!git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1" # github: встать на PR с указанным id
# удалить локальные ветки, слитые в текущую, плюс все мёртвые ссылки на ветки в origin:
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 # создание новое ветки
cp = cherry-pick # применить коммит поверх текущего HEAD
bheads = branch -vv # показать список веток с последними коммитами
heads = log --graph --decorate --simplify-by-decoration --oneline # лог только по последним коммитам веток
# управление ветками ----------------------------------------------------
br = status -sb # показать название текущей ветки
branch = branch --list # показать текущую ветку в общем списке локальных веток
brd = branch -d # удалить слитую ветку локально
brD = branch -D # удалить НЕслитую ветку локально
brod = "!f(){ git branch -d "${1}"; git push origin :"${1}"; };f" # удалить слитую ветку локально и на origin
broD = "!f(){ git branch -D "${1}"; git push origin :"${1}"; };f" # удалить НЕслитую ветку локально и на origin
merged = branch --merged # показать список слитых веток
# удалить все слитые ветки
#bclean = "!f() { DEFAULT=master; git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; }; f"
mn = merge --no-ff # слить ветку с принудительным коммитом слияния
# переключение между ветками ----------------------------------------------
master = "!git checkout master && git pull" # переключиться на ветку master и обновление
dev = "!git checkout dev && git pull" # переключиться на ветку dev и обновление
develop = "!git checkout develop && git pull" # переключиться на ветку develop и обновление
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 # по-тихому прикрепляет все индексированные файлы к последнему коммиту, используя уже существующее сообщение
amend = commit --amend --no-edit # прикрепляет все индексированные файлы к последнему коммиту, используя уже существующее сообщение
# amenda = commit --amend --no-edit -a
amendm = commit --amend -m # прикрепляет все индексированные файлы к последнему коммиту, спрашивает новое сообщение к коммиту
cp = cherry-pick # применить коммит поверх текущего HEAD
diffc = diff --cached # показать дельту staged-файла
uncommit = reset --soft HEAD~1
# управление изменениями, сброс состояний, откат --------------------------
st = status -sb # короткий status
rh = reset --hard # откат коммита с удалением всех изменений на указанный коммит
rhh = reset --hard HEAD # откат коммита с удалением всех изменений на последний коммит
rs = reset --soft # откат коммита с сохранением всех изменений на указанный коммит
rsh = reset --soft HEAD # откат коммита с сохранением всех изменений
unstage = reset HEAD # удаляет файл из staged перед коммитом
clear = checkout -- # удаляет изменения в unstaged-файле
reseth = reset --mixed HEAD # откат коммита с сохранением всех изменений
unstage = reset HEAD # переводит файл staged => unstaged без потери изменений
clear = checkout -- # удаляет изменения в файле
# штучка чтобы не терять наработки, которые ещё в процессе
# на самом деле, надо исопользовать стеш для таких дел
# алиасы для временной фиксации
# на самом деле, для таких дел надо использовать git stash
# save = !git add -A && git commit -m 'SAVEPOINT'
# wip = commit -am "WIP"
# undo = reset HEAD~1 --mixed
# работа с remote-репами --------------------------------------------------
p = push # отправить ветку
po = push origin # отправить ветку в origin
pt = push --tags # отправить теги
pl = pull # получить ветку
plo = pull origin # получить ветку из origin
ploh = pull origin HEAD # получить текущую ветку из origin
pushf = push --force # отправить ветку принудительно
pushft = push --tags --force # отправить теги принудительно
pullf = pull --force # отправить ветки принудительно
pullt = 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
rpo = remote prune origin # удалить все мёртвые ссылки на ветки в origin
repush = 'git push origin :$1 && git push origin $1' # удалить ветку на origin и отправить её заново
# просмотр логов ----------------------------------------------------------
head = log -1 HEAD # показать последний коммит в текущей ветке
heads = log --graph --decorate --simplify-by-decoration --oneline # коммиты, которыми оканчиваются ветки
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'
# подмодули ---------------------------------------------------------------
# сабмодули ---------------------------------------------------------------
si = submodule init # инициализация сабмодулей
sdi = submodule deinit -f # удаление сабмодуля
sa = submodule add # добавление сабмодуля

View File

@ -2,7 +2,7 @@
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/anthony/.oh-my-zsh"
export ZSH="$HOME/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
@ -103,4 +103,4 @@ source $ZSH/oh-my-zsh.sh
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
source ~/.aliases
source ~/.bash_aliases

View File

@ -1,10 +1,13 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing software from apt..."
echo
echo "==============================================="
echo "Installing software from apt..."
echo "==============================================="
echo
aptu
aptug
apti apt-transport-https \
sudo apt update && sudo apt upgrade -y --autoremove
sudo apt install -y --autoremove \
apt-transport-https \
ca-certificates \
curl \
make \
@ -39,6 +42,9 @@ apti apt-transport-https \
lsp-plugins \
lsb-release \
net-tools \
nmap \
p7zip-full \
sqlitebrowser \
# minder \
# redshift \
# redshift-gtk \

View File

@ -1,15 +1,22 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing snap and its software..."
echo
echo "==============================================="
echo "Installing flatpak and its software..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
snapi() {
snap install $1 2>/dev/null
[[ $? -ne 0 ]] && snap install $1 --classic
}
if !installed snapd; then
aptu
apti snapd
apti gnome-software-plugin-snap
# snapi core
# snapi snapd
else
snap refresh core
sudo apt update
sudo apt install -y --autoremove snapd gnome-software-plugin-snap
fi
snapi snap-store
@ -32,6 +39,4 @@ sudo ln -s /snap/bin/certbot /usr/bin/certbot
# snapi mysql-workbench-community
# snapi dbeaver-ce
# snapi discord
# snapi liquibase
# snapi postman
# snapi obs-studio

View File

@ -1,8 +1,12 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing flatpak and its software..."
echo
echo "==============================================="
echo "Installing flatpak and its software..."
echo "==============================================="
echo
apti flatpak \
sudo apt install -y --autoremove \
flatpak \
gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

View File

@ -1,8 +1,20 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing zsh + oh-my-zsh"
echo
echo "==============================================="
echo "Installing zsh + oh-my-zsh"
echo "==============================================="
echo
apti zsh
installed() {
command -v "$1" >/dev/null 2>&1
}
if ! installed git || ! installed curl; then
echo "ERROR: you need git and curl to be installed!"
exit 1
fi
sudo apt install -y --autoremove zsh
# sudo chsh -s $(which zsh)
# Based on:
@ -12,16 +24,16 @@ apti zsh
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/
echo ""
echo
echo "1. Installing oh-my-zsh..."
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
echo ""
echo
echo "2. Installing powerlevel9k theme (legacy)..."
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
sed -i 's@^ZSH_THEME=.*$@ZSH_THEME="powerlevel9k/powerlevel9k"@g' ~/.zshrc
echo ""
echo
echo "3. Installing powerline fonts..."
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
@ -31,11 +43,12 @@ fc-cache -vf ~/.local/share/fonts/
mkdir -p ~/.config/fontconfig/conf.d/
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
echo ""
echo
echo "4. Installing autosuggestions and syntax highlighting..."
git clone https://github.com/zsh-users/zsh-autosuggestions.git .oh-my-zsh/custom/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git .oh-my-zsh/custom/plugins/zsh-syntax-highlighting
sed -i 's@plugins=(git)@plugins=(git zsh-autosuggestions zsh-syntax-highlighting)@g' ~/.zshrc
echo ""
echo
echo "Finish! Log out of your session and login again."
echo

View File

@ -1,12 +1,14 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing git..."
echo
echo "==============================================="
echo "Installing git..."
echo "==============================================="
echo
if installed 'git'; then
if installed git; then
[ ! -d "/usr/src/git" ] && sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git
sudo chown -R $USER: /usr/src/git
cd /usr/src/git/
# sudo git pull
sudo make prefix=/usr/local all
sudo make prefix=/usr/local install
else
@ -19,6 +21,9 @@ else
cd /usr/src
sudo rm -rf git
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
sudo chown -R anthony: /usr/src/git
sudo chown -R $USER: /usr/src/git
fi
success "$(git --version)"
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
DOTFILESDIR="$ENVDIR"/dotfiles
git --version
cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig

View File

@ -1,21 +1,24 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing docker..."
echo
echo "==============================================="
echo "Installing docker..."
echo "==============================================="
echo
# https://docs.docker.com/engine/install/ubuntu/
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
# sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
# sudo apt update
# apti docker-ce docker-compose
# sudo apt install -y --autoremove docker-ce docker-compose
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
apti docker-ce docker-ce-cli containerd.io
sudo apt install -y --autoremove docker-ce docker-ce-cli containerd.io
sudo usermod -aG docker anthony
success "You need to logout and log in again to apply docker group"
echo "You need to logout and log in again to apply docker group"

View File

@ -1,6 +1,9 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing ulauncher from apt..."
echo
echo "==============================================="
echo "Installing ulauncher..."
echo "==============================================="
echo
sudo add-apt-repository ppa:agornostal/ulauncher
apti ulauncher
sudo apt install -y --autoremove ulauncher

View File

@ -1,6 +1,9 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing syncthing..."
echo
echo "==============================================="
echo "Installing syncthing..."
echo "==============================================="
echo
# https://apt.syncthing.net/
@ -14,10 +17,10 @@ echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing candidate" | sudo tee /etc/apt/sources.list.d/syncthing.list
# Update and install syncthing:
aptu
apti syncthing
sudo apt update
sudo apt install -y --autoremove syncthing
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O /home/anthony/.local/share/applications/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O /home/anthony/.local/share/applications/syncthing-ui.desktop
ln -s /home/anthony/.local/share/applications/syncthing-start.desktop /home/anthony/.config/autostart/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-start.desktop" -O $HOME/.local/share/applications/syncthing-start.desktop
wget "https://raw.githubusercontent.com/syncthing/syncthing/main/etc/linux-desktop/syncthing-ui.desktop" -O $HOME/.local/share/applications/syncthing-ui.desktop
ln -s $HOME/.local/share/applications/syncthing-start.desktop $HOME/.config/autostart/syncthing-start.desktop
# или демоном: https://habr.com/ru/post/350892/

View File

@ -1,6 +1,9 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing grub-customizer..."
echo
echo "==============================================="
echo "Installing grub-customizer..."
echo "==============================================="
echo
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
apti grub-customizer
sudo apt install -y --autoremove grub-customizer

View File

@ -1,9 +1,12 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing wine"
echo
echo "==============================================="
echo "Installing wine..."
echo "==============================================="
echo
sudo dpkg --add-architecture i386
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ focal main'
apti winehq-stable
installed "wine" && success "wine installed!"
sudo apt install -y --autoremove winehq-stable
wine --version

View File

@ -1,10 +1,13 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing google chrome (latest)..."
echo
echo "==============================================="
echo "Installing google chrome (latest)..."
echo "==============================================="
echo
# https://t.me/axenov_blog/251
# snapi chromium
# sudo snap install chromium
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

View File

@ -1,24 +1,25 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing postman (latest)..."
echo
echo "==============================================="
echo "Installing postman (latest)..."
echo "==============================================="
echo
wget "https://dl.pstmn.io/download/latest/linux64" -O /tmp/postman.tar.gz
# sudo tar -xvzf /tmp/postman.tar.gz -C /usr/local/bin
sudo tar -xzf /tmp/postman.tar.gz -C /usr/local/bin
sudo tar -xzf /tmp/postman.tar.gz -C /usr/local
rm /tmp/postman.tar.gz
sudo ln -s /usr/local/bin/Postman/Postman /usr/local/bin/postman
sudo ln -s /usr/local/Postman/Postman /usr/local/bin/postman
echo "#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Postman
Exec=/usr/local/bin/postman
Icon=/usr/local/bin/Postman/app/icons/icon_128x128.png
Icon=/usr/local/Postman/app/icons/icon_128x128.png
Categories=Utility,Network
Terminal=false
Type=Application
Encoding=UTF-8
" > /home/anthony/.local/share/applications/Postman.desktop
" > $HOME/.local/share/applications/Postman.desktop
sudo update-desktop-database
installed "postman" && success "Postman installed!" || warning "Something wrong, Postman was not installed"

View File

@ -1,6 +1,11 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing telebit..."
echo
echo "==============================================="
echo "Installing telebit..."
echo "==============================================="
echo
# https://git.coolaj86.com/coolaj86/telebit.js#install
# export NODEJS_VER=v10.2 # v10.2 is tested working, but we can test other versions
# export TELEBIT_VERSION=master # git tag or branch to install from

View File

@ -1,16 +1,15 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing golang"
echo
echo "==============================================="
echo "Installing golang..."
echo "==============================================="
echo
# https://go.dev/dl/
# https://golang.org/doc/install
# https://www.vultr.com/docs/install-the-latest-version-of-golang-on-ubuntu
# if [ "$EUID" -ne 0 ]
# then echo "*** root permissions required ***"
# exit
# fi
[ $1 ] && VERSION="$1" || VERSION="1.17.5"
[ $1 ] && VERSION="$1" || VERSION="1.17.6"
FILE="go$VERSION.linux-amd64.tar.gz"
sudo rm -rf /usr/local/go
@ -19,9 +18,11 @@ sudo tar -xzf $FILE -C /usr/local
rm -rf /tmp/$FILE
sudo chown $USER: -R /usr/local/go
echo "export PATH=$PATH:/usr/local/go/bin" >> /home/anthony/.profile
echo "export GOPATH=~/.go" >> /home/anthony/.profile
echo "export PATH=$PATH:/usr/local/go/bin" >> $HOME/.profile
echo "export GOPATH=~/.go" >> $HOME/.profile
# source ~/.profile
success "$(go version)"
info "NOTE: now run \`source ~/.profile\` to apply new env vars"
echo
go version
echo "NOTE: now run 'source ~/.profile' to apply new env vars"
echo

View File

@ -1,10 +1,14 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing Window AppMenu Applet..."
echo
echo "==============================================="
echo "Installing KDE Window AppMenu Applet..."
echo "==============================================="
echo
# https://github.com/psifidotos/applet-window-appmenu/blob/master/INSTALLATION.md
apti make \
sudo apt install -y --autoremove \
make \
cmake \
extra-cmake-modules \
qtdeclarative5-dev \
@ -29,7 +33,9 @@ else
sudo rm -rf /usr/src/appmenu-applet/applet-window-appmenu-master
sudo rm -f /usr/src/appmenu-applet.zip
fi
sudo chown -R anthony: /usr/src/appmenu-applet
sudo chown -R $USER: /usr/src/appmenu-applet
cd /usr/src/appmenu-applet/
sh ./install.sh
success 'Successful! Now you can add "Window AppMenu Applet" on desktop or panel'
echo
echo 'Success! Now you can add "Window AppMenu Applet" on desktop or panel'
echo

View File

@ -1,7 +1,10 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing apache2..."
echo
echo "==============================================="
echo "Installing apache2..."
echo "==============================================="
echo
apti apache2
sudo apt install -y --autoremove apache2
sudo service apache2 restart
success "$(apache2 -v)"
apache2 -v

View File

@ -1,28 +1,32 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
PHPVER="8.1"
title "Installing php${PHPVER}..."
echo
echo "==============================================="
echo "Installing php${PHPVER}..."
echo "==============================================="
echo
sudo LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php
apti php${PHPVER} \
php${PHPVER}-xdebug \
php${PHPVER}-bcmath \
php${PHPVER}-bz2 \
php${PHPVER}-curl \
php${PHPVER}-gd \
php${PHPVER}-json \
php${PHPVER}-mbstring \
php${PHPVER}-mysql \
php${PHPVER}-opcache \
php${PHPVER}-pgsql \
php${PHPVER}-soap \
php${PHPVER}-xml \
php${PHPVER}-xmlrpc \
php${PHPVER}-xsl \
php${PHPVER}-zip
# php${PHPVER}-common
# php${PHPVER}-cli
# php${PHPVER}-dba
# php${PHPVER}-ldap
# php${PHPVER}-sqlite3
sudo apt install -y --autoremove \
php${PHPVER} \
php${PHPVER}-cli \
php${PHPVER}-common \
php${PHPVER}-xdebug \
# php${PHPVER}-bcmath \
# php${PHPVER}-bz2 \
# php${PHPVER}-curl \
# php${PHPVER}-gd \
# php${PHPVER}-json \
# php${PHPVER}-mbstring \
# php${PHPVER}-mysql \
# php${PHPVER}-opcache \
# php${PHPVER}-pgsql \
# php${PHPVER}-soap \
# php${PHPVER}-xml \
# php${PHPVER}-xmlrpc \
# php${PHPVER}-xsl \
# php${PHPVER}-sqlite3 \
# php${PHPVER}-zip
# php${PHPVER}-dba
# php${PHPVER}-ldap
php -v

View File

@ -1,10 +1,17 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing composer..."
echo
echo "==============================================="
echo "Installing composer..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
if installed "php"; then
if installed "composer"; then
warning "You already have composer installed - removing to install actual version"
echo "WARNING: You already have composer installed - removing to install actual version"
sudo apt remove -y --autoremove composer
sudo rm -f /bin/composer
sudo rm -f /usr/bin/composer
@ -26,9 +33,9 @@ if installed "php"; then
sudo cp /usr/src/composer/composer.phar /usr/local/bin/composer
cd - >/dev/null
sudo rm -rf /usr/src/composer/
installed "composer" && success "composer installed!"
installed "composer" && composer --version
else
warning "*** You need to have php installed"
echo "WARNING: You need to have php installed"
fi
# title "Installing composer.phar in home dir..."

View File

@ -1,6 +1,9 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing oci8..."
echo
echo "==============================================="
echo "Installing oci8..."
echo "==============================================="
echo
#check for
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip
@ -16,14 +19,19 @@ sudo mv ~/Downloads/instant_client/ /opt/oracle/
sudo sh -c "echo /opt/oracle/instant_client > /etc/ld.so.conf.d/oracle-instantclient.conf"
sudo ldconfig
apti php-dev php-pear build-essential libaio1 default-jdk
sudo apt install -y --autoremove \
php-dev \
php-pear \
build-essential \
libaio1 \
default-jdk
sudo pecl channel-update pecl.php.net
#sudo pecl install oci8 # php8
sudo pecl install oci8-2.2.0 # php7
sudo pecl install oci8 # php8
#sudo pecl install oci8-2.2.0 # php7
#sh -c "echo '; priority=10' > /etc/php/7.4/mods-available/oci8.ini"
sudo sh -c "echo 'extension=oci8.so' >> /etc/php/7.4/mods-available/oci8.ini"
sudo chmod 0644 /etc/php/7.4/mods-available/oci8.ini
# sudo sh -c "echo 'extension=oci8.so' >> /etc/php/7.4/mods-available/oci8.ini"
# sudo chmod 0644 /etc/php/7.4/mods-available/oci8.ini
sudo phpenmod oci8
php -i | grep oci8
@ -36,4 +44,4 @@ php -i | grep oci8
# https://pecl.php.net/package/oci8
sudo pecl install oci8-2.2.0
#sudo pecl install oci8-2.2.0

14
install/800-mariadb.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/bash
echo
echo "==============================================="
echo "Installing mariadb..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
sudo apt install -y --autoremove mariadb-server mariadb-client
sudo mysql_secure_installation
installed "php" && sudo apt install -y --autoremove php-mysql phpmyadmin

View File

@ -1,8 +0,0 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing mariadb..."
apti mariadb-server mariadb-client
sudo mysql_secure_installation
installed "php" && apti php-mysql phpmyadmin
installed "mysql" && success "mariadb installed!"

View File

@ -1,7 +1,14 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing pgsql..."
echo
echo "==============================================="
echo "Installing postgresql..."
echo "==============================================="
echo
apti postgresql postgresql-contrib
installed() {
command -v "$1" >/dev/null 2>&1
}
sudo apt install -y --autoremove postgresql postgresql-contrib
sudo service postgresql restart
installed php && apti php-pgsql
installed php && sudo apt install -y --autoremove php-pgsql

View File

@ -1,9 +1,12 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing wkhtmltopdf..."
echo
echo "==============================================="
echo "Installing wkhtmltopdf..."
echo "==============================================="
echo
# не тестировалось
wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb" -O /tmp/wkhtmltopdf.deb
sudo dpkg -i /tmp/wkhtmltopdf.deb
rm -rf /tmp/wkhtmltopdf.deb
rm /tmp/wkhtmltopdf.deb

View File

@ -1,8 +1,16 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing zint..."
echo
echo "==============================================="
echo "Installing zint..."
echo "==============================================="
echo
apti g++ cmake qtbase5-dev qttools5-dev libpng-dev
sudo apt install -y --autoremove \
g++ \
cmake \
qtbase5-dev \
qttools5-dev \
libpng-dev
if installed git; then
# 2.9.* ===============================================================================
@ -11,7 +19,6 @@ if installed git; then
sudo cmake .
sudo make
sudo make install
cd -
else
echo "You need git to be installed!"
# 2.4.2 ===============================================================================

View File

@ -1,20 +1,28 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing nodejs..."
echo
echo "==============================================="
echo "Installing nodejs..."
echo "==============================================="
echo
# apti nodejs npm
installed() {
command -v "$1" >/dev/null 2>&1
}
# sudo apt install -y --autoremove nodejs npm
if !installed "nvm"; then
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
fi
if [ $(nvm current) == 'system' ]; then
warning "You already have node installed - removing to install actual version"
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
nvm install node
nvm use node
installed "node" && success "nodejs installed! $(nvm current)"
installed "npm" && success "npm installed! $(nvm current)"
installed "node" && nvm current
nvm ls

View File

@ -1,6 +1,13 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing phpstorm-url-handler..."
echo
echo "==============================================="
echo "Installing phpstorm-url-handler..."
echo "==============================================="
echo
installed() {
command -v "$1" >/dev/null 2>&1
}
# https://github.com/rozwell/phpstorm-url-handler/
# https://askubuntu.com/a/1023143
@ -14,9 +21,9 @@ sudo rm -rf /usr/share/applications/phpstorm-url-handler.desktop >/dev/null
if installed "git"; then
sudo git clone https://github.com/rozwell/phpstorm-url-handler.git /usr/src/phpstorm-url-handler
else
sudo wget https://github.com/rozwell/phpstorm-url-handler/archive/master.zip -O /usr/src/phpstorm-url-handler.zip
sudo unzip /usr/src/phpstorm-url-handler.zip -d /usr/src/phpstorm-url-handler
sudo rm -f /usr/src/phpstorm-url-handler.zip
sudo wget https://github.com/rozwell/phpstorm-url-handler/archive/master.zip -O /tmp/phpstorm-url-handler.zip
sudo unzip /tmp/phpstorm-url-handler.zip -d /usr/src/phpstorm-url-handler
sudo rm -f /tmp/phpstorm-url-handler.zip
fi
info "Copy .desktop"

View File

@ -1,9 +1,14 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Copying dotfiles..."
require_start
echo
echo "==============================================="
echo "Installing dotfiles..."
echo "==============================================="
echo
cp $DOTFILESDIR/.aliases $HOME/.aliases
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
DOTFILESDIR="$ENVDIR"/dotfiles
cp $DOTFILESDIR/.bash_aliases $HOME/.bash_aliases
cp $DOTFILESDIR/.bashrc $HOME/.bashrc
cp $DOTFILESDIR/.zshrc $HOME/.zshrc
cp $DOTFILESDIR/.gitconfig $HOME/.gitconfig

View File

@ -1,115 +0,0 @@
#!/bin/bash
# https://misc.flogisoft.com/bash/tip_colors_and_formatting
########################################################
# Иконки
########################################################
IINFO="[ i ]"
INOTE="[ * ]"
IWARN="[ # ]"
IERROR="[ ! ]"
IFATAL="[ @ ]"
ISUCCESS="[ ! ]"
IASK="[ ? ]"
########################################################
# Атрибуты текста (форматирование)
########################################################
BOLD="\e[1m" # жирный
_BOLD="\e[21m" # нежирный
DIM="\e[2m" # приглушённый
_DIM="\e[22m" # неприглушённый
NORMAL="\e[20m" # сброс всех атрибутов
RESET="\e[0m" # сброс всех атрибутов и цветов (вообще)
########################################################
# Цвет текста
########################################################
FRESET="\e[39m"
FBLACK="\e[30m"
FWHITE="\e[97m"
FRED="\e[31m"
FGREEN="\e[32m"
FYELLOW="\e[33m"
FBLUE="\e[34m"
FLRED="\e[91m"
FLGREEN="\e[92m"
FLYELLOW="\e[93m"
FLBLUE="\e[94m"
########################################################
# Цвет фона текста
########################################################
BRESET="\e[49m"
BBLACK="\e[40m"
BWHITE="\e[107m"
BRED="\e[41m"
BGREEN="\e[42m"
BYELLOW="\e[43m"
BBLUE="\e[44m"
BLRED="\e[101m"
BLGREEN="\e[102m"
BLYELLOW="\e[103m"
BLBLUE="\e[104m"
########################################################
# Функции для вывода текста
########################################################
print() {
echo -e "$*${RESET}"
}
ask() {
IFS= read -rp "$(print ${BOLD}${BBLUE}${FWHITE}${IASK}${BRESET}\ ${BOLD}$1 ): " $2
}
dbg() {
print "${DIM}$*"
}
info() {
print "${BOLD}${FWHITE}${IINFO}${RESET}${FWHITE} $1 "
}
note() {
print "${BOLD}${DIM}${FWHITE}${INOTE}${RESET} $1 "
}
success() {
print "${BOLD}${BGREEN}${FWHITE}${ISUCCESS}${BRESET}$FGREEN $1 "
}
warn() {
print "${BOLD}${BYELLOW}${FBLACK}${IWARN}${BRESET}${FYELLOW} Warning:${RESET} $1 " >&2
}
error() {
print "${BOLD}${BLRED}${FWHITE}${IERROR} Error: ${BRESET}${FLRED} $1 " >&2
}
fatal() {
print "${BOLD}${BRED}${FWHITE}${IFATAL} FATAL: $1 " >&2
}
########################################################
# Тестирование
########################################################
# print
# print "print test"
# print
# ask "ask test" test
# print $test
# dbg "debug test"
# info "info test"
# note "note test"
# success "success test"
# warn "warn test"
# error "error test"
# fatal "fatal test"

View File

@ -1,49 +0,0 @@
#!/bin/bash
set -e
source "./../src/00-io.sh"
title() {
info ""
info "==============================================="
info " $1"
info "==============================================="
info ""
}
apti() {
sudo apt install -y --autoremove $@
}
aptu() {
sudo apt update
}
aptug() {
sudo apt upgrade -y --autoremove
}
snapi() {
snap install $1 2>/dev/null
[[ $? -ne 0 ]] && snap install $1 --classic
}
installed() {
command -v "$1" >/dev/null 2>&1
}
die() {
error "$1"
exit $2 || 1
}
require_root() {
[ $(id -u) > "0" ] && die "You must run this script with sudo!" 1
}
require_user() {
[ $(id -u) == "0" ] && die "You must run this script WITHOUT sudo!" 2
}
require_start() {
[ -z "$ENVDIR" ] && die "You must run start.sh to execute this script!" 3
}

View File

@ -1,19 +1,6 @@
#!/bin/bash
set -e
OLDDIR=`pwd`
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ENVSRCDIR="$ENVDIR"/src
INSTALLDIR="$ENVDIR"/install
DOTFILESDIR="$ENVDIR"/dotfiles
for script in "$ENVSRCDIR"/*.sh
for script in "$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"/install/*.sh
do
. "$script"
done
for script in "$INSTALLDIR"/*.sh
do
. "$script"
done
# neofetch

View File

@ -1,41 +1,34 @@
#!/bin/bash
. "../src/01-common.sh" || exit 5
title "Installing theme..."
echo
echo "==============================================="
echo "Installing theme..."
echo "==============================================="
echo
# theme
# sudo cp -R ../theme/Budgie /usr/share/themes/Budgie
sudo cp -R ../theme/Budgie /usr/share/themes/Budgie
# cursor
# sudo cp -R ../theme/Bridge /usr/share/icons/Bridge
# sudo cp -R ../theme/Capitaine /usr/share/icons/Capitaine
sudo cp -R ../theme/Bridge /usr/share/icons/Bridge
sudo cp -R ../theme/Capitaine /usr/share/icons/Capitaine
# icons
# if installed "git"; then
if installed "git"; then
sudo git clone https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git /usr/src/papirus
<<<<<<< HEAD:theme/install.sh
else
sudo wget https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/master.zip -O /usr/src/papirus.zip
sudo unzip /usr/src/papirus.zip -d /usr/src/papirus
sudo rm -f /usr/src/papirus.zip
fi
sudo chown -R anthony: /usr/src/papirus
=======
# else
# sudo wget https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/master.zip -O /usr/src/papirus.zip
# sudo unzip /usr/src/papirus.zip -d /usr/src/papirus
# sudo rm -f /usr/src/papirus.zip
# fi
>>>>>>> 80482acf7ae67d27edcc5d00c9836e94016f0fed:install/010-theme.sh
# sudo ln -s /usr/src/papirus/ePapirus /usr/share/icons/ePapirus
sudo ln -s /usr/src/papirus/ePapirus /usr/share/icons/ePapirus
sudo ln -s /usr/src/papirus/Papirus /usr/share/icons/Papirus
sudo ln -s /usr/src/papirus/Papirus-Dark /usr/share/icons/Papirus-Dark
sudo ln -s /usr/src/papirus/Papirus-Light /usr/share/icons/Papirus-Light
# dconf write /org/mate/marco/general/theme "'Budgie'"
# dconf write /org/mate/desktop/interface/gtk-theme "'Budgie'"
# dconf write /org/mate/desktop/interface/icon-theme "'Papirus-Dark'"
# dconf write /org/mate/desktop/peripherals/mouse/cursor-theme "'Capitaine'"
# dconf write /org/mate/desktop/peripherals/mouse/cursor-size 20
# dconf write /org/mate/notification-daemon/theme "'coco'"
# dconf write /org/mate/notification-daemon/popup-location "'top_right'"
dconf write /org/mate/marco/general/theme "'Budgie'"
dconf write /org/mate/desktop/interface/gtk-theme "'Budgie'"
dconf write /org/mate/desktop/interface/icon-theme "'Papirus-Dark'"
dconf write /org/mate/desktop/peripherals/mouse/cursor-theme "'Capitaine'"
dconf write /org/mate/desktop/peripherals/mouse/cursor-size 20
dconf write /org/mate/notification-daemon/theme "'coco'"
dconf write /org/mate/notification-daemon/popup-location "'top_right'"