Skip to content

Commit bc08fd4

Browse files
authored
Merge pull request #1451 from onetechnical/onetechnical/relbeta2.1.4
Onetechnical/relbeta2.1.4-2
2 parents 4e219be + 4ed93a7 commit bc08fd4

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

installer/debian/preinst

+11-9
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ fi
1111

1212
if dpkg-query --list 'algorand*' &> /dev/null
1313
then
14-
PKG_INFO=$(dpkg-query --show --showformat='${Package} ${Status}\n' 'algorand*' | grep "install ok installed")
15-
INSTALLED_PKG=$(grep -v algorand-indexer <<< "$PKG_INFO" | awk '{print $1}')
16-
17-
if [ -n "$INSTALLED_PKG" ]
14+
if PKG_INFO=$(dpkg-query --show --showformat='${Package} ${Status}\n' 'algorand*' | grep "install ok installed")
1815
then
19-
echo -e "\nAlgorand does not currently support multi-distribution installations!\n\
20-
To install this package, it is necessary to first remove the \`$INSTALLED_PKG\` package:\n\n\
21-
sudo apt-get remove $INSTALLED_PKG\n\
22-
sudo apt-get install $PKG_NAME\n"
23-
exit 1
16+
INSTALLED_PKG=$(grep -v algorand-indexer <<< "$PKG_INFO" | awk '{print $1}')
17+
18+
if [ -n "$INSTALLED_PKG" ]
19+
then
20+
echo -e "\nAlgorand does not currently support multi-distribution installations!\n\
21+
To install this package, it is necessary to first remove the \`$INSTALLED_PKG\` package:\n\n\
22+
sudo apt-get remove $INSTALLED_PKG\n\
23+
sudo apt-get install $PKG_NAME\n"
24+
exit 1
25+
fi
2426
fi
2527
fi
2628

0 commit comments

Comments
 (0)