From 0cf9e44367393e2680c10c5256bafbfe892e00ed Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 19 May 2017 14:34:05 +1000 Subject: [PATCH 1/3] Fix location of echo so that the return code check doesn't always succeed --- install/build_deb.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install/build_deb.sh b/install/build_deb.sh index 05a37822..51738e02 100755 --- a/install/build_deb.sh +++ b/install/build_deb.sh @@ -12,8 +12,8 @@ rm -r deb_dist >/dev/null 2>&1 python3 setup.py --command-packages=stdeb.command bdist_deb # return install instructions if onionshare builds properly -echo "" if [[ $? -eq 0 ]]; then + echo "" echo "To install, run:" echo "sudo dpkg -i deb_dist/onionshare_$VERSION-1_all.deb" else From 55d18d88f43d0f8035055ee9d6fee4bdcf4906b5 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 19 May 2017 14:36:28 +1000 Subject: [PATCH 2/3] account for the fact that stdeb's util.py renames .dev to ~dev, in version names --- install/build_deb.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/install/build_deb.sh b/install/build_deb.sh index 51738e02..270d647c 100755 --- a/install/build_deb.sh +++ b/install/build_deb.sh @@ -13,6 +13,9 @@ python3 setup.py --command-packages=stdeb.command bdist_deb # return install instructions if onionshare builds properly if [[ $? -eq 0 ]]; then + # The build process in stdeb's util.py renames .dev to ~dev + # Adjust it here for the purposes of displaying the right filename + VERSION="${VERSION/.dev/~dev}" echo "" echo "To install, run:" echo "sudo dpkg -i deb_dist/onionshare_$VERSION-1_all.deb" From 5567e435dddb5ccd6c1083da8396ab3dd86bc101 Mon Sep 17 00:00:00 2001 From: Miguel Jacq Date: Fri, 19 May 2017 14:42:23 +1000 Subject: [PATCH 3/3] exit 1 on failure for completeness --- install/build_deb.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/build_deb.sh b/install/build_deb.sh index 270d647c..aec026a4 100755 --- a/install/build_deb.sh +++ b/install/build_deb.sh @@ -21,4 +21,5 @@ if [[ $? -eq 0 ]]; then echo "sudo dpkg -i deb_dist/onionshare_$VERSION-1_all.deb" else echo "OnionShare failed to build!" + exit 1 fi