Moved exports to config/exports, fixed codestyles

This commit is contained in:
2023-04-02 03:56:51 +03:00
parent cceeba3f8e
commit 995cc569e7
18 changed files with 195 additions and 424 deletions

View File

@@ -1,19 +1,19 @@
#!/bin/sh
#!/bin/bash
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")"
if command -v php &> /dev/null; then
EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')"
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'
if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ]; then
echo >&2 'ERROR: Invalid installer checksum'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar ~/.local/bin/composer
exit $RESULT
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
mv composer.phar ~/.local/bin/composer
exit $RESULT

View File

@@ -1,11 +0,0 @@
#!/bin/bash
NFTY_VERSION=2.2.0
curl -L "https://github.com/binwiederhier/ntfy/releases/download/v${NFTY_VERSION}/ntfy_${NFTY_VERSION}_macOS_all.tar.gz" > "ntfy_${NFTY_VERSION}_macOS_all.tar.gz"
tar zxvf "ntfy_${NFTY_VERSION}_macOS_all.tar.gz"
cp -a "ntfy_${NFTY_VERSION}_macOS_all/ntfy" ~/.local/bin/ntfy
mkdir -p ~/.config/ntfy
cp "ntfy_${NFTY_VERSION}_macOS_all/client/client.yml" ~/.config/ntfy/client.yml
ntfy --help
rm -rf "ntfy_${NFTY_VERSION}_macOS_all" "ntfy_${NFTY_VERSION}_macOS_all.tar.gz"

13
scripts/install-ntfy.sh Executable file
View File

@@ -0,0 +1,13 @@
#!/bin/bash
NTFY_VERSION=2.2.0
NTFY_URL="https://github.com/binwiederhier/ntfy"
NTFY_DEST="ntfy_${NTFY_VERSION}_macOS_all"
curl -L "$NTFY_URL/releases/download/v${NTFY_VERSION}/${NTFY_DEST}.tar.gz" > "${NTFY_DEST}.tar.gz"
tar zxvf "${NTFY_DEST}.tar.gz"
cp -a "${NTFY_DEST}/ntfy" ~/.local/bin/ntfy
mkdir -p ~/.config/ntfy
cp "${NTFY_DEST}/client/client.yml" ~/.config/ntfy/client.yml
ntfy --help
rm -rf "${NTFY_DEST}" "${NTFY_DEST}.tar.gz"