Skip to content

Commit

Permalink
Merge pull request #1451 from onetechnical/onetechnical/relbeta2.1.4
Browse files Browse the repository at this point in the history
Onetechnical/relbeta2.1.4-2
  • Loading branch information
algojohnlee authored Aug 26, 2020
2 parents 4e219be + 4ed93a7 commit bc08fd4
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions installer/debian/preinst
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit bc08fd4

Please sign in to comment.