From eade74c29a5d04ee15b8afa81ba9ab2c6926471f Mon Sep 17 00:00:00 2001 From: Emiliano Vavassori Date: Wed, 30 Mar 2022 01:06:38 +0200 Subject: [PATCH] Script per gli update. Aggiunte directory all'ignore. Non creato checksum per .ver. --- .gitignore | 3 +++ check_updates.sh | 23 +++++++++++++++++++++++ loaih/__init__.py | 9 +++++++++ 3 files changed, 35 insertions(+) create mode 100755 check_updates.sh diff --git a/.gitignore b/.gitignore index 5ceb386..ff7d489 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,4 @@ venv +build +dist +loaih.egg-info diff --git a/check_updates.sh b/check_updates.sh new file mode 100755 index 0000000..5820256 --- /dev/null +++ b/check_updates.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +pushd $(dirname $0) +# Checking if pull is successfull +git fetch origin +LC_ALL=C git status | grep -q "Your branch is up to date"; retval=$? + +if [[ ${retval} -ne 0 ]]; then + # Let us update the pip installation + git pull + # for the sake of consistency, let's make the check_updates.sh script + # executable + chmod +x check_updates.sh + pip3 uninstall -y loaih + # build the actual toolkit + python3 setup.py bdist_wheel + pip3 install dist/*.whl; rv=$? + + if [[ ${rv} -eq 0 ]]; then + # cleanup + rm -rf dist +fi +popd diff --git a/loaih/__init__.py b/loaih/__init__.py index 6964d1a..30161fa 100644 --- a/loaih/__init__.py +++ b/loaih/__init__.py @@ -199,6 +199,11 @@ class Build(object): self.__unpackbuild__(arch) def __unpackbuild__(self, arch, generalize = False): + if generalize and self.portable: + # Doesn't particularly make sense to build a generic portable + # version. Just skipping the specific generic build + return + # We start by filtering out tarballs from the list buildtarballs = [ self.tarballs[arch][0] ] @@ -305,6 +310,10 @@ class Build(object): os.chdir(self.appnamedir) for appimage in glob.glob('*.AppImage*'): + if appimage.endswith('.ver'): + # Skipping checksums for .ver files. + continue + # See if a checksum already exist if not os.path.exists(appimage + '.md5'): subprocess.run("md5sum {appimage} > {appimage}.md5".format(appimage = appimage), shell=True)