Compare commits
1 Commits
a6e0696e31
...
experiment
| Author | SHA1 | Date | |
|---|---|---|---|
|
5970e9b968
|
@@ -1,4 +0,0 @@
|
||||
.git
|
||||
.gitignore
|
||||
.dockerignore
|
||||
README.md
|
||||
27
Dockerfile
27
Dockerfile
@@ -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
|
||||
13
LICENSE
13
LICENSE
@@ -1,13 +0,0 @@
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
Version 2, December 2004
|
||||
|
||||
Copyright (C) 2022 Антон Аксенов <anthonyaxenov@gmail.com>
|
||||
|
||||
Everyone is permitted to copy and distribute verbatim or modified
|
||||
copies of this license document, and changing it is allowed as long
|
||||
as the name is changed.
|
||||
|
||||
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. You just DO WHAT THE FUCK YOU WANT TO.
|
||||
39
Makefile
39
Makefile
@@ -1,14 +1,7 @@
|
||||
# Autogenerated at 05.07.2022 10:52 using ./gen-makefile
|
||||
# Autogenerated at 04.07.2022 22:11 using ./gen-makefile.sh
|
||||
|
||||
##flameshot: [TODO] [PACK] qt5 + flameshot from source
|
||||
flameshot: qt5 flameshot-build
|
||||
|
||||
##lamp: [PACK] Apache + php + mariadb
|
||||
##lamp: Apache + php + mariadb
|
||||
lamp: apache php mariadb
|
||||
|
||||
##omz: [PACK] zsh + omz + powerline10k + MesloLGS fonts
|
||||
omz: zsh omz-clean
|
||||
|
||||
##apache: Install apache2 (latest)
|
||||
apache:
|
||||
./install/apache
|
||||
@@ -37,10 +30,6 @@ droidcam:
|
||||
droidcam-obs:
|
||||
./install/droidcam-obs
|
||||
|
||||
##flameshot-build: [TODO] Build flameshot from src (latest)
|
||||
flameshot-build:
|
||||
./install/flameshot-build
|
||||
|
||||
##git: Install git (latest)
|
||||
git:
|
||||
./install/git
|
||||
@@ -57,10 +46,6 @@ grubc:
|
||||
kde-appmenu:
|
||||
./install/kde-appmenu
|
||||
|
||||
##libreoffice: Install libreoffice
|
||||
libreoffice:
|
||||
./install/libreoffice
|
||||
|
||||
##lite-xl: Install lite-xl v2.0.5 (draft)
|
||||
lite-xl:
|
||||
./install/lite-xl
|
||||
@@ -73,14 +58,6 @@ mariadb:
|
||||
nodejs:
|
||||
./install/nodejs
|
||||
|
||||
##omz-clean: Install omz (latest) + powerline10k + MesloLGS fonts
|
||||
omz-clean:
|
||||
./install/omz-clean
|
||||
|
||||
##papirus: Install papirus-icon-theme (latest)
|
||||
papirus:
|
||||
./install/papirus
|
||||
|
||||
##pgsql: Install postgresql (latest) and php-pgsql (if php is installed)
|
||||
pgsql:
|
||||
./install/pgsql
|
||||
@@ -93,11 +70,7 @@ php:
|
||||
postman:
|
||||
./install/postman
|
||||
|
||||
##qt5: Install qt5
|
||||
qt5:
|
||||
./install/qt5
|
||||
|
||||
##rustdesk: Install rustdesk client v1.1.9 (deb)
|
||||
##rustdesk: Install rustdesk v1.1.8 (deb)
|
||||
rustdesk:
|
||||
./install/rustdesk
|
||||
|
||||
@@ -125,7 +98,7 @@ wine:
|
||||
zint:
|
||||
./install/zint
|
||||
|
||||
##zsh: Install vanilla zsh
|
||||
##zsh: Install zsh + omz (latest)
|
||||
zsh:
|
||||
./install/zsh
|
||||
|
||||
@@ -136,6 +109,6 @@ help: Makefile
|
||||
@echo "Available goals:"
|
||||
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/"
|
||||
|
||||
##<goal>_: Same as 'cat ./install/<goal>'
|
||||
##<goal>_: Same as 'cat ./install/<goal>.sh'
|
||||
%_:
|
||||
@cat ./install/$*
|
||||
@cat ./install/$*.sh
|
||||
|
||||
54
README.md
54
README.md
@@ -4,14 +4,11 @@
|
||||
|
||||
## Requirements
|
||||
|
||||
* Ubuntu >= 20.04 (not tested with version < 20)
|
||||
* `bash`, `zsh` or other `sh`-compatible shell
|
||||
* `make` (optional but recommended)
|
||||
* `wget` (necessary for some scripts)
|
||||
* `git` (necessary for some scripts)
|
||||
|
||||
If some dependecies are missed for some of these scripts it is enougth to run `./install/apt` in most cases.
|
||||
|
||||
## Usage
|
||||
|
||||
### Clone this repo (recommended)
|
||||
@@ -26,37 +23,33 @@ wget -qO - https://git.axenov.dev/anthony/my-env/archive/master.tar.gz | tar -zx
|
||||
# switch to repo dir
|
||||
cd my-env
|
||||
|
||||
# generate fresh ./Makefile and get full list of `make` goals
|
||||
./gen-makefile
|
||||
|
||||
# get full list of `make` goals
|
||||
make help
|
||||
```
|
||||
|
||||
> I do not recommend to run `make` without arguments since then ALL goals will be started in their order.
|
||||
>
|
||||
> Use `make help` to look around.
|
||||
# generate new ./Makefile and get full list of `make` goals
|
||||
./gen-makefile.sh
|
||||
```
|
||||
|
||||
### Selective straightforward installation
|
||||
|
||||
```shell
|
||||
# from remote file
|
||||
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt | bash
|
||||
wget -qO - https://git.axenov.dev/anthony/my-env/raw/branch/master/install/apt.sh | bash
|
||||
|
||||
# from locally cloned repo
|
||||
./install/apt
|
||||
./install/apt.sh
|
||||
```
|
||||
|
||||
## How to add a new software script?
|
||||
|
||||
1. Create new `./install/*` script.
|
||||
1. Create new `./install/*.sh` script.
|
||||
At the beggining of a file you must write these two lines:
|
||||
```shell
|
||||
#!/bin/bash
|
||||
##makedesc: Your description for Makefile
|
||||
```
|
||||
2. Test your script
|
||||
3. Run `./gen-makefile` to generate new `./Makefile`
|
||||
3. Run `./gen-makefile.sh` to generate new `./Makefile`
|
||||
|
||||
## How to create packs?
|
||||
|
||||
@@ -79,36 +72,3 @@ mypackY: goalA goalB
|
||||
where:
|
||||
* `mypack*` is the pack name
|
||||
* `goal*` are script names in `./install`
|
||||
|
||||
## Testing in docker (not recommended)
|
||||
|
||||
> 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)
|
||||
|
||||
## License
|
||||
|
||||
[WTFPLv2](LICENSE)
|
||||
|
||||
12
experimental/flatpak
Executable file
12
experimental/flatpak
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing flatpak and its software..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
sudo apt install -y --autoremove \
|
||||
flatpak \
|
||||
gnome-software-plugin-flatpak
|
||||
|
||||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||||
49
experimental/oci8
Normal file
49
experimental/oci8
Normal file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing oci8..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
# https://www.oracle.com/cis/database/technologies/instant-client/downloads.html
|
||||
|
||||
#check for
|
||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linuxx64.zip
|
||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip -- only libociicus.so
|
||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linuxx64.zip
|
||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-tools-linuxx64.zip
|
||||
# wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linuxx64.zip
|
||||
#unzip
|
||||
|
||||
sudo mkdir /opt/oracle/
|
||||
sudo mv ~/Downloads/instant_client/ /opt/oracle/
|
||||
|
||||
sudo sh -c "echo /opt/oracle/instant_client > /etc/ld.so.conf.d/oracle-instantclient.conf"
|
||||
sudo ldconfig
|
||||
|
||||
sudo apt install -y --autoremove \
|
||||
php-dev \
|
||||
php-pear \
|
||||
build-essential \
|
||||
libaio1 \
|
||||
default-jdk
|
||||
sudo pecl channel-update pecl.php.net
|
||||
sudo pecl install oci8 # php8
|
||||
#sudo pecl install oci8-2.2.0 # php7
|
||||
|
||||
#sh -c "echo '; priority=10' > /etc/php/7.4/mods-available/oci8.ini"
|
||||
# sudo sh -c "echo 'extension=oci8.so' >> /etc/php/7.4/mods-available/oci8.ini"
|
||||
# sudo chmod 0644 /etc/php/7.4/mods-available/oci8.ini
|
||||
sudo phpenmod oci8
|
||||
php -i | grep oci8
|
||||
|
||||
# instantclient,/opt/oracle/instant_client
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# https://pecl.php.net/package/oci8
|
||||
#sudo pecl install oci8-2.2.0
|
||||
42
experimental/phpstorm-url-handler
Normal file
42
experimental/phpstorm-url-handler
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing phpstorm-url-handler..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
installed() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
# https://github.com/rozwell/phpstorm-url-handler/
|
||||
# https://askubuntu.com/a/1023143
|
||||
# https://askubuntu.com/a/919825
|
||||
# https://medium.com/swlh/custom-protocol-handling-how-to-8ac41ff651eb
|
||||
# https://www.linuxquestions.org/questions/linux-desktop-74/xdg-open-doesn%27t-recognize-custom-protocol-4175433062/#post4809984
|
||||
|
||||
sudo rm -rf /usr/bin/phpstorm-url-handler >/dev/null
|
||||
sudo rm -rf ~/.local/share/applications/phpstorm-url-handler.desktop >/dev/null
|
||||
sudo rm -rf /usr/share/applications/phpstorm-url-handler.desktop >/dev/null
|
||||
if installed "git"; then
|
||||
sudo git clone https://github.com/rozwell/phpstorm-url-handler.git /usr/src/phpstorm-url-handler
|
||||
else
|
||||
sudo wget https://github.com/rozwell/phpstorm-url-handler/archive/master.zip -O /tmp/phpstorm-url-handler.zip
|
||||
sudo unzip /tmp/phpstorm-url-handler.zip -d /usr/src/phpstorm-url-handler
|
||||
sudo rm -f /tmp/phpstorm-url-handler.zip
|
||||
fi
|
||||
|
||||
info "Copy .desktop"
|
||||
sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler.desktop /usr/share/local/applications/phpstorm-url-handler.desktop
|
||||
|
||||
info "Symlink bin"
|
||||
sudo cp /usr/src/phpstorm-url-handler/phpstorm-url-handler /usr/bin/phpstorm-url-handler
|
||||
|
||||
info "desktop-file-install"
|
||||
sudo desktop-file-install phpstorm-url-handler.desktop
|
||||
|
||||
info "update-desktop-database"
|
||||
sudo update-desktop-database -v 2>&1 | grep -E "^(.+)\/phpstorm-url-handler.desktop(.+)$"
|
||||
|
||||
info "xdg-mime"
|
||||
xdg-mime default phpstorm-url-handler.desktop x-scheme-handler/phpstorm
|
||||
46
experimental/samp-server
Normal file
46
experimental/samp-server
Normal file
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing samp-server v03svr_R2-1..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
# https://sampwiki.blast.hk/wiki/Linux_Server
|
||||
# https://team.sa-mp.com/wiki/Server.cfg_RU.html
|
||||
|
||||
cd $HOME
|
||||
wget -qO - https://files.sa-mp.com/samp03svr_R2-1.tar.gz | tar -zxf -
|
||||
# sudo dpkg --add-architecture i386
|
||||
# sudo apt update
|
||||
# sudo apt install -y libc6:i386
|
||||
apt-get install ia32-libs
|
||||
|
||||
echo "echo Executing Server Config...
|
||||
lanmode 0
|
||||
rcon 1
|
||||
language Russian
|
||||
rcon_password bootsector
|
||||
maxplayers 50
|
||||
port 7777
|
||||
hostname My Server
|
||||
gamemode0 bare 1
|
||||
filterscripts base gl_actions gl_property gl_realtime
|
||||
announce 1
|
||||
query 1
|
||||
weburl
|
||||
maxnpc 0
|
||||
onfoot_rate 40
|
||||
incar_rate 40
|
||||
weapon_rate 40
|
||||
stream_distance 800.0
|
||||
stream_rate 1000
|
||||
timestamp 1
|
||||
output 0
|
||||
" > $HOME/samp03/server.cfg
|
||||
|
||||
ln -s $HOME/samp03/samp03svr /usr/local/bin/samp
|
||||
|
||||
echo
|
||||
echo "Success! Now run via 'samp &'"
|
||||
echo
|
||||
|
||||
12
experimental/wkhtmltopdf
Executable file
12
experimental/wkhtmltopdf
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing wkhtmltopdf..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
# не тестировалось
|
||||
|
||||
wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb" -O /tmp/wkhtmltopdf.deb
|
||||
sudo dpkg -i /tmp/wkhtmltopdf.deb
|
||||
rm /tmp/wkhtmltopdf.deb
|
||||
@@ -4,7 +4,6 @@ echo -e "# Autogenerated at $(date +'%d.%m.%Y %H:%M') using ${BASH_SOURCE[0]}\n"
|
||||
|
||||
for file in ./packs/*; do
|
||||
cat ${file} >> Makefile
|
||||
echo >> Makefile
|
||||
done;
|
||||
|
||||
for file in ./install/*; do
|
||||
@@ -21,13 +20,14 @@ help: Makefile
|
||||
@echo "Usage:"
|
||||
@echo "\tmake <goal>\n"
|
||||
@echo "Available goals:"
|
||||
@sed -n 's/^##//p' \$< | column -t -s ':' | sed -e "s/^/\t/"
|
||||
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e "s/^/\t/"
|
||||
|
||||
##<goal>_: Same as 'cat ./install/<goal>'
|
||||
##<goal>_: Same as 'cat ./install/<goal>.sh'
|
||||
%_:
|
||||
@cat ./install/\$*
|
||||
@cat ./install/\$*.sh
|
||||
EOF
|
||||
|
||||
|
||||
echo "New ./Makefile has been generated!"
|
||||
echo "Old one has been saved as ./Makefile.bak"
|
||||
echo
|
||||
@@ -7,6 +7,6 @@ echo "Installing apache2..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
sudo apt install -y --autoremove apache2 && \
|
||||
sudo systemctl restart apache2 && \
|
||||
apache2 -v
|
||||
sudo apt install -y --autoremove apache2
|
||||
sudo service apache2 restart
|
||||
apache2 -v
|
||||
|
||||
66
install/apt
66
install/apt
@@ -7,50 +7,54 @@ echo "Installing software from apt..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
sudo apt update && \
|
||||
sudo apt upgrade -y --autoremove
|
||||
|
||||
sudo apt install -y \
|
||||
alien \
|
||||
sudo apt update && sudo apt upgrade -y --autoremove
|
||||
sudo apt install -y --autoremove \
|
||||
apt-transport-https \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
curl \
|
||||
dconf-editor \
|
||||
default-jdk \
|
||||
make \
|
||||
cmake \
|
||||
dialog \
|
||||
gettext \
|
||||
gnupg \
|
||||
gparted \
|
||||
hardinfo \
|
||||
htop \
|
||||
build-essential \
|
||||
software-properties-common \
|
||||
libaio1 \
|
||||
libssl-dev \
|
||||
libghc-zlib-dev \
|
||||
libcurl4-gnutls-dev \
|
||||
libexpat1-dev \
|
||||
libghc-zlib-dev \
|
||||
libssl-dev \
|
||||
lsb-release \
|
||||
lsp-plugins \
|
||||
make \
|
||||
gettext \
|
||||
gnupg \
|
||||
ubuntu-restricted-extras \
|
||||
unzip \
|
||||
mc \
|
||||
meld \
|
||||
htop \
|
||||
nano \
|
||||
neofetch \
|
||||
default-jdk \
|
||||
terminator \
|
||||
dconf-editor \
|
||||
alien \
|
||||
meld \
|
||||
vlc \
|
||||
gparted \
|
||||
hardinfo \
|
||||
libreoffice \
|
||||
pulseeffects \
|
||||
lsp-plugins \
|
||||
lsb-release \
|
||||
net-tools \
|
||||
nmap \
|
||||
p7zip-full \
|
||||
pulseeffects \
|
||||
software-properties-common \
|
||||
sqlitebrowser \
|
||||
terminator \
|
||||
ubuntu-restricted-extras \
|
||||
unzip \
|
||||
vlc
|
||||
# earlyoom \
|
||||
# etckeeper \
|
||||
# geoclue-2.0 \
|
||||
sqlitebrowser
|
||||
# gnome-software \
|
||||
# minder \
|
||||
# redshift \
|
||||
# redshift-gtk
|
||||
# redshift-gtk \
|
||||
# nodejs \
|
||||
# compiz \
|
||||
# compizconfig-settings-manager \
|
||||
# earlyoom \
|
||||
# etckeeper \
|
||||
# deepin-screenshot \
|
||||
# geoclue-2.0 \
|
||||
# at
|
||||
|
||||
@@ -9,6 +9,7 @@ echo
|
||||
|
||||
# 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
|
||||
# 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
|
||||
|
||||
@@ -11,31 +11,46 @@ 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"
|
||||
if installed "php"; then
|
||||
if installed "composer"; then
|
||||
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
|
||||
sudo rm -f /usr/local/bin/composer
|
||||
sudo rm -rf /usr/src/composer
|
||||
fi
|
||||
|
||||
sudo mkdir -m 0777 -p /usr/src/composer
|
||||
cd /usr/src/composer
|
||||
|
||||
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
|
||||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
|
||||
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
||||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
|
||||
fi
|
||||
sudo mkdir -m 0777 -p /usr/src/composer
|
||||
cd /usr/src/composer
|
||||
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
|
||||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
|
||||
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
||||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
|
||||
>&2 echo 'ERROR: Invalid installer checksum'
|
||||
rm composer-setup.php
|
||||
exit 1
|
||||
fi
|
||||
php composer-setup.php --quiet
|
||||
sudo cp /usr/src/composer/composer.phar /usr/local/bin/composer
|
||||
cd - >/dev/null
|
||||
sudo rm -rf /usr/src/composer/
|
||||
installed "composer" && composer --version
|
||||
else
|
||||
echo "WARNING: You need to have php installed"
|
||||
fi
|
||||
php composer-setup.php --quiet
|
||||
sudo cp /usr/src/composer/composer.phar /usr/local/bin/composer
|
||||
cd - >/dev/null
|
||||
sudo rm -rf /usr/src/composer/
|
||||
installed "composer" && composer --version
|
||||
|
||||
# title "Installing composer.phar in home dir..."
|
||||
# cd ~
|
||||
# EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
|
||||
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||
# ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
||||
# if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
|
||||
# then
|
||||
# >&2 echo 'ERROR: Invalid installer signature'
|
||||
# rm composer-setup.php
|
||||
# exit 1
|
||||
# fi
|
||||
# php composer-setup.php --quiet
|
||||
# RESULT=$?
|
||||
# rm composer-setup.php
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
#!/bin/bash
|
||||
##makedesc: [TODO] Build flameshot from src (latest)
|
||||
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing flameshot (latest)..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
32
install/git
32
install/git
@@ -10,31 +10,29 @@ echo
|
||||
installed() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
ENVDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||||
|
||||
! installed make && sudo apt install -y make
|
||||
|
||||
if installed git; then
|
||||
if [ -d "${HOME}/install/git" ]; then
|
||||
cd /usr/src/git/ && \
|
||||
git pull
|
||||
else
|
||||
git clone https://github.com/git/git.git --depth=1 "${HOME}/install/git" && \
|
||||
sudo rm -rf /usr/src/git
|
||||
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
|
||||
sudo chown -R $USER: /usr/src/git
|
||||
cd /usr/src/git/
|
||||
fi
|
||||
sudo make prefix=/usr/local all && \
|
||||
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" && \
|
||||
rm /tmp/git.zip && \
|
||||
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"
|
||||
wget https://github.com/git/git/archive/master.zip -O /tmp/git.zip
|
||||
sudo unzip -q /tmp/git.zip -d /usr/src/git
|
||||
rm /tmp/git.zip
|
||||
cd /usr/src/git/git-master
|
||||
sudo make prefix=/usr/local all
|
||||
sudo make prefix=/usr/local install
|
||||
cd /usr/src
|
||||
sudo rm -rf git
|
||||
sudo git clone https://github.com/git/git.git --depth=1 /usr/src/git
|
||||
sudo chown -R $USER: /usr/src/git
|
||||
fi
|
||||
|
||||
git --version
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/bash
|
||||
##makedesc: Install libreoffice
|
||||
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing libreoffice..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
sudo apt update && \
|
||||
sudo apt install -y --autoremove libreoffice
|
||||
@@ -1,49 +0,0 @@
|
||||
#!/bin/bash
|
||||
##makedesc: Install omz (latest) + powerline10k + MesloLGS fonts
|
||||
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing omz (latest) + powerline10k + MesloLGS fonts..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
installed() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if ! installed zsh || ! installed git || ! installed curl; then
|
||||
echo "ERROR: you need git, zsh and curl to be installed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "1. Installing oh-my-zsh..."
|
||||
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||
|
||||
echo
|
||||
echo "2. Installing MesloLGS fonts..."
|
||||
mkdir -p ~/.local/share/fonts/
|
||||
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Regular.ttf -O "~/.local/share/fonts/MesloLGS NF Regular.ttf"
|
||||
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold.ttf -O "~/.local/share/fonts/MesloLGS NF Bold.ttf"
|
||||
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Italic.ttf -O "~/.local/share/fonts/MesloLGS NF Italic.ttf"
|
||||
wget https://github.com/romkatv/powerlevel10k-media/raw/master/MesloLGS%20NF%20Bold%20Italic.ttf -O "~/.local/share/fonts/MesloLGS NF Bold Italic.ttf"
|
||||
fc-cache -vf ~/.local/share/fonts/
|
||||
|
||||
echo
|
||||
echo "3. Installing powerlevel10k theme..."
|
||||
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
|
||||
sed -i 's#^ZSH_THEME=.*$#ZSH_THEME="powerlevel10k/powerlevel10k"#g' ~/.zshrc
|
||||
|
||||
echo
|
||||
echo "4. Installing plugins..."
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
|
||||
sed -i 's/^plugins=/#plugins=/g' ~/.zshrc
|
||||
echo "plugins=(git laravel docker docker-compose composer zsh-autosuggestions zsh-syntax-highlighting)" >> ~/.zshrc
|
||||
p10k configure
|
||||
|
||||
echo
|
||||
echo "Finish! You need to:"
|
||||
echo "- review your plugins in ~/.zshrc"
|
||||
echo "- log out of your session and login again"
|
||||
echo
|
||||
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
##makedesc: Install papirus-icon-theme (latest)
|
||||
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing papirus-icon-theme (latest)..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
installed() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if installed git; then
|
||||
mkdir ${HOME}/install/
|
||||
git clone https://github.com/PapirusDevelopmentTeam/papirus-icon-theme.git --depth=1 ${HOME}/install/papirus-icon-theme
|
||||
else
|
||||
! installed wget && sudo apt install -y wget
|
||||
mkdir ${HOME}/install/papirus-icon-theme
|
||||
wget https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/archive/refs/heads/master.zip -O ${HOME}/install/papirus-icon-theme.zip
|
||||
unzip ${HOME}/install/papirus-icon-theme.zip -d ${HOME}/install/papirus-icon-theme
|
||||
fi
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
@@ -7,21 +7,21 @@ echo "Installing postman (latest)..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
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 && \
|
||||
cat << EOF > ${HOME}/.local/share/applications/Postman.desktop
|
||||
#!/usr/bin/env xdg-open
|
||||
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
|
||||
rm /tmp/postman.tar.gz
|
||||
sudo ln -s /usr/local/Postman/Postman /usr/local/bin/postman
|
||||
|
||||
echo "#!/usr/bin/env xdg-open
|
||||
|
||||
[Desktop Entry]
|
||||
Name=Postman
|
||||
Exec=${HOME}/.local/bin/postman
|
||||
Icon=${HOME}/install/postman/Postman/app/icons/icon_128x128.png
|
||||
Exec=/usr/local/bin/postman
|
||||
Icon=/usr/local/Postman/app/icons/icon_128x128.png
|
||||
Categories=Utility,Network
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Encoding=UTF-8
|
||||
EOF
|
||||
" > $HOME/.local/share/applications/Postman.desktop
|
||||
sudo update-desktop-database
|
||||
|
||||
25
install/qt5
25
install/qt5
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash
|
||||
##makedesc: Install qt5
|
||||
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing qt5..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
sudo apt install -y --autoremove \
|
||||
build-essential \
|
||||
ca-certificates \
|
||||
cmake \
|
||||
g++ \
|
||||
libqt5core5a \
|
||||
libqt5dbus5 \
|
||||
libqt5gui5 \
|
||||
libqt5network5 \
|
||||
libqt5svg5 \
|
||||
libqt5svg5-dev \
|
||||
libqt5widgets5 \
|
||||
openssl \
|
||||
qtbase5-dev \
|
||||
qttools5-dev \
|
||||
qttools5-dev-tools
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
##makedesc: Install rustdesk client v1.1.9 (deb)
|
||||
##makedesc: Install rustdesk v1.1.8 (deb)
|
||||
|
||||
[ $1 ] && RDVER="$1" || RDVER="1.1.9"
|
||||
[ $1 ] && RDVER="$1" || RDVER="1.1.8"
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing rustdesk v${RDVER}..."
|
||||
@@ -10,6 +10,7 @@ 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
|
||||
sudo apt install libxdo3
|
||||
wget "http://github.com/rustdesk/rustdesk/releases/download/${RDVER}/rustdesk-${RDVER}.deb" -qO /tmp/rustdesk.deb
|
||||
sudo dpkg -i /tmp/rustdesk.deb
|
||||
rm /tmp/rustdesk.deb
|
||||
|
||||
51
install/zsh
51
install/zsh
@@ -1,11 +1,56 @@
|
||||
#!/bin/bash
|
||||
##makedesc: Install vanilla zsh
|
||||
##makedesc: Install zsh + omz (latest)
|
||||
|
||||
echo
|
||||
echo "==============================================="
|
||||
echo "Installing vanilla zsh..."
|
||||
echo "Installing zsh + omz (latest)..."
|
||||
echo "==============================================="
|
||||
echo
|
||||
|
||||
installed() {
|
||||
command -v "$1" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if ! installed git || ! installed curl; then
|
||||
echo "ERROR: you need git and curl to be installed!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
sudo apt install -y --autoremove zsh
|
||||
echo "source ~/.profile" >> ~/.zshrc
|
||||
# sudo chsh -s $(which zsh)
|
||||
|
||||
# Based on:
|
||||
# https://github.com/Powerlevel9k/powerlevel9k/wiki/Install-Instructions
|
||||
# https://github.com/ohmyzsh/ohmyzsh
|
||||
# https://powerline.readthedocs.io/en/latest/installation/linux.html#fonts-installation
|
||||
# https://gist.github.com/dogrocker/1efb8fd9427779c827058f873b94df95
|
||||
# https://linuxhint.com/install_zsh_shell_ubuntu_1804/
|
||||
|
||||
echo
|
||||
echo "1. Installing oh-my-zsh..."
|
||||
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
|
||||
|
||||
echo
|
||||
echo "2. Installing powerlevel9k theme (legacy)..."
|
||||
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
|
||||
sed -i 's@^ZSH_THEME=.*$@ZSH_THEME="powerlevel9k/powerlevel9k"@g' ~/.zshrc
|
||||
|
||||
echo
|
||||
echo "3. Installing powerline fonts..."
|
||||
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
|
||||
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
|
||||
mkdir -p ~/.local/share/fonts/
|
||||
mv PowerlineSymbols.otf ~/.local/share/fonts/
|
||||
fc-cache -vf ~/.local/share/fonts/
|
||||
mkdir -p ~/.config/fontconfig/conf.d/
|
||||
mv 10-powerline-symbols.conf ~/.config/fontconfig/conf.d/
|
||||
|
||||
echo
|
||||
echo "4. Installing autosuggestions and syntax highlighting..."
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions.git .oh-my-zsh/custom/plugins/zsh-autosuggestions
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git .oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
||||
sed -i 's@plugins=(git)@plugins=(git zsh-autosuggestions zsh-syntax-highlighting)@g' ~/.zshrc
|
||||
|
||||
echo
|
||||
echo "Finish! Log out of your session and login again."
|
||||
echo
|
||||
|
||||
@@ -1,2 +0,0 @@
|
||||
##flameshot: [TODO] [PACK] qt5 + flameshot from source
|
||||
flameshot: qt5 flameshot-build
|
||||
@@ -1,2 +0,0 @@
|
||||
##lamp: [PACK] Apache + php + mariadb
|
||||
lamp: apache php mariadb
|
||||
2
packs/lamp.makefile
Normal file
2
packs/lamp.makefile
Normal file
@@ -0,0 +1,2 @@
|
||||
##lamp: Apache + php + mariadb
|
||||
lamp: apache php mariadb
|
||||
Reference in New Issue
Block a user