Browse Source

contrib: reformat most shell scripts

Mostly just indentations.
For consistency, to conform to .editorconfig.
master
SomberNight 3 years ago
parent
commit
b5900eae98
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 3
      contrib/build-linux/appimage/make_appimage.sh
  2. 7
      contrib/build-linux/sdist/make_sdist.sh
  3. 2
      contrib/build-wine/build-electrum-git.sh
  4. 2
      contrib/build-wine/sign.sh
  5. 2
      contrib/build-wine/unsign.sh
  6. 2
      contrib/freeze_packages.sh
  7. 2
      contrib/osx/make_osx.sh
  8. 12
      contrib/osx/notarize_app.sh
  9. 6
      contrib/release.sh
  10. 2
      contrib/upload.sh

3
contrib/build-linux/appimage/make_appimage.sh

@ -18,8 +18,7 @@ PYTHON_VERSION=3.9.11
PY_VER_MAJOR="3.9" # as it appears in fs paths PY_VER_MAJOR="3.9" # as it appears in fs paths
PKG2APPIMAGE_COMMIT="a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d" PKG2APPIMAGE_COMMIT="a9c85b7e61a3a883f4a35c41c5decb5af88b6b5d"
VERSION=$(git describe --tags --dirty --always)
VERSION=`git describe --tags --dirty --always`
APPIMAGE="$DISTDIR/electrum-$VERSION-x86_64.AppImage" APPIMAGE="$DISTDIR/electrum-$VERSION-x86_64.AppImage"
. "$CONTRIB"/build_tools_util.sh . "$CONTRIB"/build_tools_util.sh

7
contrib/build-linux/sdist/make_sdist.sh vendored

@ -48,9 +48,10 @@ fi
find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} + find -exec touch -h -d '2000-11-11T11:11:11+00:00' {} +
# note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963 # note: .zip sdists would not be reproducible due to https://bugs.python.org/issue40963
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]) if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then
then PY_DISTDIR="dist/_sourceonly" # The DISTDIR variable of this script is only used to find where the output is *finally* placed. PY_DISTDIR="dist/_sourceonly" # The DISTDIR variable of this script is only used to find where the output is *finally* placed.
else PY_DISTDIR="dist" else
PY_DISTDIR="dist"
fi fi
TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar --dist-dir="$PY_DISTDIR" TZ=UTC faketime -f '2000-11-11 11:11:11' python3 setup.py --quiet sdist --format=gztar --dist-dir="$PY_DISTDIR"
if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then if ([ "$OMIT_UNCLEAN_FILES" = 1 ]); then

2
contrib/build-wine/build-electrum-git.sh

@ -12,7 +12,7 @@ set -e
pushd $WINEPREFIX/drive_c/electrum pushd $WINEPREFIX/drive_c/electrum
VERSION=`git describe --tags --dirty --always` VERSION=$(git describe --tags --dirty --always)
info "Last commit: $VERSION" info "Last commit: $VERSION"
# Load electrum-locale for this release # Load electrum-locale for this release

2
contrib/build-wine/sign.sh

@ -29,7 +29,7 @@ echo "Found $(ls *.exe | wc -w) files to sign."
for f in $(ls *.exe); do for f in $(ls *.exe); do
echo "Signing $f..." echo "Signing $f..."
osslsigncode sign \ osslsigncode sign \
-pass $WIN_SIGNING_PASSWORD\ -pass "$WIN_SIGNING_PASSWORD" \
-h sha256 \ -h sha256 \
-certs "$CERT_FILE" \ -certs "$CERT_FILE" \
-key "$KEY_FILE" \ -key "$KEY_FILE" \

2
contrib/build-wine/unsign.sh

@ -14,7 +14,7 @@ set -e
mkdir -p signed >/dev/null 2>&1 mkdir -p signed >/dev/null 2>&1
mkdir -p signed/stripped >/dev/null 2>&1 mkdir -p signed/stripped >/dev/null 2>&1
version=`python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)"` version=$(python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)")
echo "Found $(ls dist/*.exe | wc -w) files to verify." echo "Found $(ls dist/*.exe | wc -w) files to verify."

2
contrib/freeze_packages.sh

@ -13,7 +13,7 @@ else
SYSTEM_PYTHON=$(which $SYSTEM_PYTHON) || printf "" SYSTEM_PYTHON=$(which $SYSTEM_PYTHON) || printf ""
fi fi
if [[ ! "$SYSTEM_PYTHON" ]] ; then if [[ ! "$SYSTEM_PYTHON" ]] ; then
echo "Please specify which python to use in \$SYSTEM_PYTHON" && exit 1; echo "Please specify which python to use in \$SYSTEM_PYTHON" && exit 1
fi fi
which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; } which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; }

2
contrib/osx/make_osx.sh

@ -232,7 +232,7 @@ find "$VENV_DIR/lib/python$PY_VER_MAJOR/site-packages/" -type f -name '*.so' -pr
info "Faking timestamps..." info "Faking timestamps..."
find . -exec touch -t '200101220000' {} + || true find . -exec touch -t '200101220000' {} + || true
VERSION=`git describe --tags --dirty --always` VERSION=$(git describe --tags --dirty --always)
info "Building binary" info "Building binary"
ELECTRUM_VERSION=$VERSION pyinstaller --noconfirm --ascii --clean contrib/osx/osx.spec || fail "Could not build binary" ELECTRUM_VERSION=$VERSION pyinstaller --noconfirm --ascii --clean contrib/osx/osx.spec || fail "Could not build binary"

12
contrib/osx/notarize_app.sh

@ -28,7 +28,8 @@ RESULT=$(xcrun altool --notarize-app --type osx \
--primary-bundle-id org.electrum.electrum \ --primary-bundle-id org.electrum.electrum \
--username $APPLE_ID_USER \ --username $APPLE_ID_USER \
--password @env:APPLE_ID_PASSWORD \ --password @env:APPLE_ID_PASSWORD \
--output-format xml) --output-format xml
)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Submitting $APP_BUNDLE failed:" echo "Submitting $APP_BUNDLE failed:"
@ -37,7 +38,8 @@ if [ $? -ne 0 ]; then
fi fi
REQUEST_UUID=$(echo "$RESULT" | xpath \ REQUEST_UUID=$(echo "$RESULT" | xpath \
"//key[normalize-space(text()) = 'RequestUUID']/following-sibling::string[1]/text()" 2> /dev/null) "//key[normalize-space(text()) = 'RequestUUID']/following-sibling::string[1]/text()" 2>/dev/null
)
if [ -z "$REQUEST_UUID" ]; then if [ -z "$REQUEST_UUID" ]; then
echo "Submitting $APP_BUNDLE failed:" echo "Submitting $APP_BUNDLE failed:"
@ -56,9 +58,11 @@ do
RESULT=$(xcrun altool --notarization-info "$REQUEST_UUID" \ RESULT=$(xcrun altool --notarization-info "$REQUEST_UUID" \
--username "$APPLE_ID_USER" \ --username "$APPLE_ID_USER" \
--password @env:APPLE_ID_PASSWORD \ --password @env:APPLE_ID_PASSWORD \
--output-format xml) --output-format xml
)
STATUS=$(echo "$RESULT" | xpath \ STATUS=$(echo "$RESULT" | xpath \
"//key[normalize-space(text()) = 'Status']/following-sibling::string[1]/text()" 2> /dev/null) "//key[normalize-space(text()) = 'Status']/following-sibling::string[1]/text()" 2>/dev/null
)
if [ "$STATUS" = "success" ]; then if [ "$STATUS" = "success" ]; then
echo "Notarization of $APP_BUNDLE succeeded!" echo "Notarization of $APP_BUNDLE succeeded!"

6
contrib/release.sh

@ -73,9 +73,9 @@ if [ ! -z "$RELEASEMANAGER" ] ; then
fi fi
VERSION=`python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)"` VERSION=$(python3 -c "import electrum; print(electrum.version.ELECTRUM_VERSION)")
info "VERSION: $VERSION" info "VERSION: $VERSION"
REV=`git describe --tags` REV=$(git describe --tags)
info "REV: $REV" info "REV: $REV"
COMMIT=$(git rev-parse HEAD) COMMIT=$(git rev-parse HEAD)
@ -250,7 +250,7 @@ else
info "updating www repo" info "updating www repo"
./contrib/make_download $WWW_DIR ./contrib/make_download $WWW_DIR
info "signing the version announcement file" info "signing the version announcement file"
sig=`./run_electrum -o signmessage $ELECTRUM_SIGNING_ADDRESS $VERSION -w $ELECTRUM_SIGNING_WALLET` sig=$(./run_electrum -o signmessage $ELECTRUM_SIGNING_ADDRESS $VERSION -w $ELECTRUM_SIGNING_WALLET)
echo "{ \"version\":\"$VERSION\", \"signatures\":{ \"$ELECTRUM_SIGNING_ADDRESS\":\"$sig\"}}" > $WWW_DIR/version echo "{ \"version\":\"$VERSION\", \"signatures\":{ \"$ELECTRUM_SIGNING_ADDRESS\":\"$sig\"}}" > $WWW_DIR/version

2
contrib/upload.sh

@ -15,7 +15,7 @@ fi
cd "$PROJECT_ROOT" cd "$PROJECT_ROOT"
version=`git describe --tags --abbrev=0` version=$(git describe --tags --abbrev=0)
echo $version echo $version
if [ -z "$ELECBUILD_UPLOADFROM" ]; then if [ -z "$ELECBUILD_UPLOADFROM" ]; then

Loading…
Cancel
Save