Skip to content

Commit 8aadd71

Browse files
committed
Fix lsb_release problem
1 parent 7b58c52 commit 8aadd71

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

install.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@ then
55
SUDO_FLAG="sudo"
66
fi
77

8-
if [ "E`lsb_release -i --short`" = "EUbuntu" ]
9-
then
10-
$SUDO_FLAG apt-get install curl jq -q=2
11-
elif [[ `cat /etc/redhat-release` =~ "CentOS" || `cat /etc/redhat-release` =~ "Red Hat Enterprise Linux" ]]
8+
if [[ `cat /etc/redhat-release` =~ "CentOS" || `cat /etc/redhat-release` =~ "Red Hat Enterprise Linux" ]]
129
then
1310
$SUDO_FLAG yum install curl jq -q -y
11+
elif [ "E`lsb_release -i --short`" = "EUbuntu" ]
12+
then
13+
$SUDO_FLAG apt-get install curl jq -q=2
1414
else
1515
echo "This program only supports Ubuntu and CentOS (RHEL). "
1616
exit 255

swiftbox.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
#!/bin/bash
22

3-
if [ "E`lsb_release -i --short`" = "EUbuntu" ]
4-
then
5-
SYSTEM_NAME="ubuntu"
6-
SYSTEM_VERSION=`lsb_release -r --short`
7-
elif [[ `cat /etc/redhat-release` =~ "CentOS" || `cat /etc/redhat-release` =~ "Red Hat Enterprise Linux" ]]
3+
if [[ `cat /etc/redhat-release` =~ "CentOS" || `cat /etc/redhat-release` =~ "Red Hat Enterprise Linux" ]]
84
then
95
SYSTEM_NAME="centos"
106
SYSTEM_VERSION=`cat /etc/redhat-release | grep -E "release \d+" -o | sed "s/release //"`
7+
elif [ "E`lsb_release -i --short`" = "EUbuntu" ]
8+
then
9+
SYSTEM_NAME="ubuntu"
10+
SYSTEM_VERSION=`lsb_release -r --short`
1111
else
1212
echo "This program only supports Ubuntu and CentOS (RHEL). "
1313
exit 255
1414
fi
1515

16-
SWIFTBOX_VERSION="0.6.1"
16+
SWIFTBOX_VERSION="0.6.2"
1717
INSTALL_DIR="/usr/bin"
1818

1919
get-latest() {

0 commit comments

Comments
 (0)