summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Lee <64482439+algojohnlee@users.noreply.github.com>2020-08-25 22:06:53 -0400
committerGitHub <noreply@github.com>2020-08-25 22:06:53 -0400
commitbc08fd4e37b0213b8f466387e36ee88a3ebc2c44 (patch)
tree883a0b0bfb3970c3ed3c271c558cfd94e7ebabbc
parent4e219bea8578f5075a08a42917bea0a50a60764b (diff)
parent4ed93a709af5279ca54a049c9aadb48c84054a75 (diff)
Merge pull request #1451 from onetechnical/onetechnical/relbeta2.1.4v2.1.4-beta
Onetechnical/relbeta2.1.4-2
-rwxr-xr-xinstaller/debian/preinst20
1 files changed, 11 insertions, 9 deletions
diff --git a/installer/debian/preinst b/installer/debian/preinst
index 7b75c5e1e..6817072ee 100755
--- a/installer/debian/preinst
+++ b/installer/debian/preinst
@@ -11,16 +11,18 @@ fi
if dpkg-query --list 'algorand*' &> /dev/null
then
- PKG_INFO=$(dpkg-query --show --showformat='${Package} ${Status}\n' 'algorand*' | grep "install ok installed")
- INSTALLED_PKG=$(grep -v algorand-indexer <<< "$PKG_INFO" | awk '{print $1}')
-
- if [ -n "$INSTALLED_PKG" ]
+ if PKG_INFO=$(dpkg-query --show --showformat='${Package} ${Status}\n' 'algorand*' | grep "install ok installed")
then
- echo -e "\nAlgorand does not currently support multi-distribution installations!\n\
-To install this package, it is necessary to first remove the \`$INSTALLED_PKG\` package:\n\n\
-sudo apt-get remove $INSTALLED_PKG\n\
-sudo apt-get install $PKG_NAME\n"
- exit 1
+ INSTALLED_PKG=$(grep -v algorand-indexer <<< "$PKG_INFO" | awk '{print $1}')
+
+ if [ -n "$INSTALLED_PKG" ]
+ then
+ echo -e "\nAlgorand does not currently support multi-distribution installations!\n\
+ To install this package, it is necessary to first remove the \`$INSTALLED_PKG\` package:\n\n\
+ sudo apt-get remove $INSTALLED_PKG\n\
+ sudo apt-get install $PKG_NAME\n"
+ exit 1
+ fi
fi
fi