|
1 | 1 | #!/bin/bash |
2 | 2 |
|
3 | | -SWIFTBOX_VERSION="0.8.3" |
| 3 | +SWIFTBOX_VERSION="0.8.4" |
4 | 4 | INSTALL_DIR="/usr/bin" |
5 | 5 |
|
6 | 6 | if [ -f /etc/redhat-release ] |
@@ -93,11 +93,11 @@ init-env() { |
93 | 93 | case $SYSTEM_NAME in |
94 | 94 | ubuntu) |
95 | 95 | $SUDO_FLAG apt-get update -q=2 |
96 | | - $SUDO_FLAG apt-get install git libpython2.7 binutils tzdata libcurl4 libxml2 clang libicu-dev curl wget pkg-config zlib1g-dev libedit2 libsqlite3-0 -y |
| 96 | + $SUDO_FLAG apt-get install coreutils git libpython2.7 binutils tzdata libcurl4 libxml2 clang libicu-dev curl wget pkg-config zlib1g-dev libedit2 libsqlite3-0 -y |
97 | 97 | ;; |
98 | 98 | centos) |
99 | 99 | $SUDO_FLAG yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm |
100 | | - $SUDO_FLAG yum install --enablerepo=PowerTools curl wget binutils gcc git glibc-static libbsd-devel libedit libedit-devel libicu-devel libstdc++-static pkg-config python2 sqlite -y |
| 100 | + $SUDO_FLAG yum install --enablerepo=PowerTools coreutils curl wget binutils gcc git glibc-static libbsd-devel libedit libedit-devel libicu-devel libstdc++-static pkg-config python2 sqlite -y |
101 | 101 | ;; |
102 | 102 | esac |
103 | 103 | wget -q -O - https://swift.org/keys/all-keys.asc | $SUDO_FLAG gpg --import - |
@@ -366,17 +366,17 @@ lookup) |
366 | 366 | echo "Swift $NEW_VERSION is available for $SYSTEM_NICENAME $SYSTEM_VERSION" |
367 | 367 | ;; |
368 | 368 | update) |
369 | | - if [ $(cd `dirname $0`; pwd) != $(cd $INSTALL_DIR; pwd) ] |
| 369 | + if [ $(realpath `dirname $0`) != $(realpath $INSTALL_DIR) ] |
370 | 370 | then |
371 | 371 | echo "swiftbox is not installed to system, update is unavailable. " |
372 | | - echo "You can install it with: $SUDO_FLAG $0 install" |
| 372 | + echo "You can install it with: $0 install" |
373 | 373 | exit 254 |
374 | 374 | fi |
375 | | - $SUDO_FLAG sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/stevapple/swiftbox@`get-latest`/install.sh)" |
| 375 | + sh -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/stevapple/swiftbox@`get-latest`/install.sh)" |
376 | 376 | exit $? |
377 | 377 | ;; |
378 | 378 | install) |
379 | | - if [ $(cd `dirname $0`; pwd) = $(cd $INSTALL_DIR; pwd) ] |
| 379 | + if [ $(realpath `dirname $0`) = $(realpath $INSTALL_DIR) ] |
380 | 380 | then |
381 | 381 | echo "swiftbox is already installed to system. " |
382 | 382 | exit 1 |
|
0 commit comments