shfmt various shell scripts, evaluate grep -c

This commit is contained in:
Gene Hoffman 2020-10-31 19:35:04 -07:00 committed by Yostra
parent 917e51071c
commit 55a1ad8ed1
4 changed files with 133 additions and 137 deletions

View File

@ -29,7 +29,7 @@ echo "npm build"
npm install
LAST_EXIT_CODE=$?
if [ "$LAST_EXIT_CODE" -ne 0 ]; then
>&2 echo "npm run build failed!"
echo >&2 "npm run build failed!"
exit $LAST_EXIT_CODE
fi
electron-packager . Chia --asar.unpack="**/daemon/**" --platform=darwin --icon=src/assets/img/Chia.icns --overwrite --app-bundle-id=net.chia.blockchain --appVersion=$CHIA_INSTALLER_VERSION

View File

@ -23,7 +23,7 @@ if [ "$(uname)" = "Linux" ]; then
curl -sL https://rpm.nodesource.com/setup_10.x | sudo bash -
sudo yum install -y nodejs
fi
elif [ "$(uname)" = "Darwin" ] && type brew && ! npm version>/dev/null 2>&1; then
elif [ "$(uname)" = "Darwin" ] && type brew && ! npm version >/dev/null 2>&1; then
# Install npm if not installed
brew install npm
elif [ "$(uname)" = "OpenBSD" ]; then

View File

@ -7,7 +7,7 @@ PYTHON_VERSION=$(python -c 'import sys; print(f"python{sys.version_info.major}.{
echo "Python version: $PYTHON_VERSION"
export BUILD_VDF_BENCH=Y # Installs the useful vdf_bench test of CPU squaring speed
THE_PATH=$(python -c 'import pkg_resources; print( pkg_resources.get_distribution("chiavdf").location)' 2> /dev/null)/vdf_client
THE_PATH=$(python -c 'import pkg_resources; print( pkg_resources.get_distribution("chiavdf").location)' 2>/dev/null)/vdf_client
CHIAVDF_VERSION=$(python -c 'from setup import dependencies; t = [_ for _ in dependencies if _.startswith("chiavdf")][0]; print(t)')
ubuntu_cmake_install() {

View File

@ -47,12 +47,9 @@ fi
find_python() {
set +e
unset BEST_VERSION
for V in 37 3.7 38 3.8 3
do
if which python$V > /dev/null
then
if [ x"$BEST_VERSION" = x ]
then
for V in 37 3.7 38 3.8 3; do
if which python$V >/dev/null; then
if [ x"$BEST_VERSION" = x ]; then
BEST_VERSION=$V
fi
fi
@ -61,8 +58,7 @@ find_python() {
set -e
}
if [ x"$INSTALL_PYTHON_VERSION" = x ]
then
if [ x"$INSTALL_PYTHON_VERSION" = x ]; then
INSTALL_PYTHON_VERSION=$(find_python)
fi