Compare commits
1 Commits
82559869fc
...
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.
|
|
||||||
7
Makefile
7
Makefile
@@ -1,8 +1,7 @@
|
|||||||
# Autogenerated at 04.07.2022 23:52 using ./gen-makefile.sh
|
# Autogenerated at 04.07.2022 22:11 using ./gen-makefile.sh
|
||||||
|
|
||||||
##lamp: Apache + php + mariadb
|
##lamp: Apache + php + mariadb
|
||||||
lamp: apache php mariadb
|
lamp: apache php mariadb
|
||||||
|
|
||||||
##apache: Install apache2 (latest)
|
##apache: Install apache2 (latest)
|
||||||
apache:
|
apache:
|
||||||
./install/apache
|
./install/apache
|
||||||
@@ -110,6 +109,6 @@ help: Makefile
|
|||||||
@echo "Available goals:"
|
@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
|
||||||
|
|||||||
28
README.md
28
README.md
@@ -30,9 +30,6 @@ make help
|
|||||||
./gen-makefile.sh
|
./gen-makefile.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
> I do not recomend to run `make` without arguments.
|
|
||||||
> Use `make help` to look around.
|
|
||||||
|
|
||||||
### Selective straightforward installation
|
### Selective straightforward installation
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -75,28 +72,3 @@ mypackY: goalA goalB
|
|||||||
where:
|
where:
|
||||||
* `mypack*` is the pack name
|
* `mypack*` is the pack name
|
||||||
* `goal*` are script names in `./install`
|
* `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.
|
|
||||||
|
|
||||||
## 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
|
for file in ./packs/*; do
|
||||||
cat ${file} >> Makefile
|
cat ${file} >> Makefile
|
||||||
echo >> Makefile
|
|
||||||
done;
|
done;
|
||||||
|
|
||||||
for file in ./install/*; do
|
for file in ./install/*; do
|
||||||
@@ -21,13 +20,14 @@ help: Makefile
|
|||||||
@echo "Usage:"
|
@echo "Usage:"
|
||||||
@echo "\tmake <goal>\n"
|
@echo "\tmake <goal>\n"
|
||||||
@echo "Available goals:"
|
@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
|
EOF
|
||||||
|
|
||||||
|
|
||||||
echo "New ./Makefile has been generated!"
|
echo "New ./Makefile has been generated!"
|
||||||
echo "Old one has been saved as ./Makefile.bak"
|
echo "Old one has been saved as ./Makefile.bak"
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ echo "Installing apache2..."
|
|||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
sudo apt install -y --autoremove apache2 && \
|
sudo apt install -y --autoremove apache2
|
||||||
sudo systemctl restart apache2 && \
|
sudo service apache2 restart
|
||||||
apache2 -v
|
apache2 -v
|
||||||
|
|||||||
72
install/apt
72
install/apt
@@ -7,56 +7,54 @@ echo "Installing software from apt..."
|
|||||||
echo "==============================================="
|
echo "==============================================="
|
||||||
echo
|
echo
|
||||||
|
|
||||||
sudo apt update && \
|
sudo apt update && sudo apt upgrade -y --autoremove
|
||||||
sudo apt upgrade -y --autoremove
|
sudo apt install -y --autoremove \
|
||||||
|
|
||||||
sudo apt install -y \
|
|
||||||
alien \
|
|
||||||
apt-transport-https \
|
apt-transport-https \
|
||||||
build-essential \
|
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
cmake \
|
|
||||||
curl \
|
curl \
|
||||||
dconf-editor \
|
make \
|
||||||
default-jdk \
|
cmake \
|
||||||
dialog \
|
dialog \
|
||||||
gettext \
|
build-essential \
|
||||||
gnupg \
|
software-properties-common \
|
||||||
gparted \
|
|
||||||
hardinfo \
|
|
||||||
htop \
|
|
||||||
libaio1 \
|
libaio1 \
|
||||||
|
libssl-dev \
|
||||||
|
libghc-zlib-dev \
|
||||||
libcurl4-gnutls-dev \
|
libcurl4-gnutls-dev \
|
||||||
libexpat1-dev \
|
libexpat1-dev \
|
||||||
libghc-zlib-dev \
|
gettext \
|
||||||
libreoffice \
|
gnupg \
|
||||||
libssl-dev \
|
ubuntu-restricted-extras \
|
||||||
lsb-release \
|
unzip \
|
||||||
lsp-plugins \
|
|
||||||
make \
|
|
||||||
mc \
|
mc \
|
||||||
meld \
|
htop \
|
||||||
nano \
|
nano \
|
||||||
neofetch \
|
neofetch \
|
||||||
|
default-jdk \
|
||||||
|
terminator \
|
||||||
|
dconf-editor \
|
||||||
|
alien \
|
||||||
|
meld \
|
||||||
|
vlc \
|
||||||
|
gparted \
|
||||||
|
hardinfo \
|
||||||
|
libreoffice \
|
||||||
|
pulseeffects \
|
||||||
|
lsp-plugins \
|
||||||
|
lsb-release \
|
||||||
net-tools \
|
net-tools \
|
||||||
nmap \
|
nmap \
|
||||||
p7zip-full \
|
p7zip-full \
|
||||||
pulseeffects \
|
sqlitebrowser
|
||||||
software-properties-common \
|
|
||||||
sqlitebrowser \
|
|
||||||
terminator \
|
|
||||||
ubuntu-restricted-extras \
|
|
||||||
unzip \
|
|
||||||
vlc \
|
|
||||||
# at \
|
|
||||||
# compiz \
|
|
||||||
# compizconfig-settings-manager \
|
|
||||||
# deepin-screenshot \
|
|
||||||
# earlyoom \
|
|
||||||
# etckeeper \
|
|
||||||
# geoclue-2.0 \
|
|
||||||
# gnome-software \
|
# gnome-software \
|
||||||
# minder \
|
# minder \
|
||||||
# nodejs \
|
|
||||||
# redshift \
|
# 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
|
# 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 snap install chromium
|
||||||
sudo dpkg -i /tmp/google-chrome-stable_current_amd64.deb && \
|
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" -O /tmp/google-chrome-stable_current_amd64.deb
|
||||||
rm /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
|
command -v "$1" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
!installed "php" && echo "WARNING: You need to have php installed"
|
if installed "php"; then
|
||||||
|
if installed "composer"; then
|
||||||
if installed "composer"; then
|
echo "WARNING: You already have composer installed - removing to install actual version"
|
||||||
echo "WARNING: Removing current composer to install its actual version"
|
sudo apt remove -y --autoremove composer
|
||||||
sudo apt remove -y --autoremove composer
|
sudo rm -f /bin/composer
|
||||||
sudo rm -f /bin/composer
|
sudo rm -f /usr/bin/composer
|
||||||
sudo rm -f /usr/bin/composer
|
sudo rm -f /usr/local/bin/composer
|
||||||
sudo rm -f /usr/local/bin/composer
|
sudo rm -rf /usr/src/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
|
||||||
|
>&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
|
fi
|
||||||
|
|
||||||
sudo mkdir -m 0777 -p /usr/src/composer
|
# title "Installing composer.phar in home dir..."
|
||||||
cd /usr/src/composer
|
# cd ~
|
||||||
|
# EXPECTED_SIGNATURE="$(wget -q -O - https://composer.github.io/installer.sig)"
|
||||||
# https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md
|
# php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
||||||
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
|
# ACTUAL_SIGNATURE="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
||||||
sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
|
# if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
|
||||||
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
|
# then
|
||||||
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
|
# >&2 echo 'ERROR: Invalid installer signature'
|
||||||
>&2 echo 'ERROR: Invalid installer checksum'
|
# rm composer-setup.php
|
||||||
rm composer-setup.php
|
# exit 1
|
||||||
exit 1
|
# fi
|
||||||
fi
|
# php composer-setup.php --quiet
|
||||||
php composer-setup.php --quiet
|
# RESULT=$?
|
||||||
sudo cp /usr/src/composer/composer.phar /usr/local/bin/composer
|
# rm composer-setup.php
|
||||||
cd - >/dev/null
|
|
||||||
sudo rm -rf /usr/src/composer/
|
|
||||||
installed "composer" && composer --version
|
|
||||||
|
|||||||
Reference in New Issue
Block a user