Skip to content

Commit

Permalink
pick lint
Browse files Browse the repository at this point in the history
  • Loading branch information
laduke committed Aug 29, 2024
1 parent d694483 commit f98ea81
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions install.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -231,21 +231,21 @@ write_apt_repo() {
$SUDO apt-get install -y gpg
$SUDO chmod a+r /tmp/zt-gpg-key

if [[ "$DISTRIBUTION" == "ubuntu" && "$VERSION" < "22.04" ]]; then
if [[ "$DISTRIBUTION" == "ubuntu" && $(echo "$VERSION < 22.04" | bc) ]]; then
_old_apt_signing $URL $CODENAME
elif [[ ("$DISTRIBUTION" == "debian" || "$DISTRIBUTION" == "raspbian") && "$VERSION" -lt "10" ]]; then
elif [[ ("$DISTRIBUTION" == "debian" || "$DISTRIBUTION" == "raspbian") && $(echo "$VERSION < 10" | bc ) ]]; then
_old_apt_signing $URL $CODENAME
elif [[ "$DISTRIBUTION" == "ubuntu" && "$VERSION" > "22.03" ]]; then # comparison to 22.03 is intentional
elif [[ "$DISTRIBUTION" == "ubuntu" && $(echo "$VERSION > 22.03" | bc) ]]; then # comparison to 22.03 is intentional
_new_apt_signing $URL $CODENAME
elif [[ ("$DISTRIBUTION" == "debian" || "$DISTRIBUTION" == "raspbian") && "$VERSION" -ge "10" ]]; then
elif [[ ("$DISTRIBUTION" == "debian" || "$DISTRIBUTION" == "raspbian") && $(echo "$VERSION >= 10" | bc) ]]; then
_new_apt_signing $URL $CODENAME
elif [[ "$DISTRIBUTION" == "kali" ]]; then
_new_apt_signing $URL $CODENAME
elif [[ "$DISTRIBUTION" == "linuxmint" && "$VERSION" == "6" ]]; then
_new_apt_signing $URL $CODENAME
elif [[ "$DISTRIBUTION" == "linuxmint" && ( "$VERSION" == "21" || "$VERSION" > "21" ) ]]; then
elif [[ "$DISTRIBUTION" == "linuxmint" && ( "$VERSION" == "21" || $(echo "$VERSION > 21" | bc) ) ]]; then
_new_apt_signing $URL $CODENAME
elif [[ "$DISTRIBUTION" == "linuxmint" && ( "$VERSION" == "20" || ("$VERSION" > "20" && "$VERSION" < "21" ) ) ]]; then
elif [[ "$DISTRIBUTION" == "linuxmint" && ( "$VERSION" == "20" || ( $(echo "$VERSION > 20" | bc) && $(echo "$VERSION < 21" | bc ) ) ) ]]; then
_old_apt_signing $URL $CODENAME
else
echo "Unsupported distribution $DISTRIBUTION $VERSION"
Expand Down Expand Up @@ -297,7 +297,7 @@ elif [ $ID == "ubuntu" ] || [ $ID == "pop" ]; then
elif [ $ID == "linuxmint" ]; then
echo '*** Detected Linux Mint, creating /etc/apt/sources.list.d/zerotier.list'

if [[ "$VERSION_ID" > "$MAX_SUPPORTED_MINT_VERSION" ]]; then
if [[ "$VERSION_ID" -gt "$MAX_SUPPORTED_MINT_VERSION" ]]; then
write_apt_repo $ID $MAX_SUPPORTED_MINT_VERSION $ZT_BASE_URL_HTTP $MAX_SUPPORTED_MINT_VERSION_NAME
else
write_apt_repo $ID $VERSION_ID $ZT_BASE_URL_HTTP ${MINT_CODENAME_MAP[${VERSION_CODENAME}]}
Expand Down

0 comments on commit f98ea81

Please sign in to comment.