Skip to content

Commit 7fef216

Browse files
authored
Merge pull request v2fly#165 from IceCodeNew/develop
2 parents 8ec8a25 + c394655 commit 7fef216

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

.github/workflows/sh-checker.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- develop
1515
jobs:
1616
sh-checker:
17-
runs-on: ubuntu-latest
17+
runs-on: ubuntu-16.04
1818
steps:
1919
- uses: actions/checkout@v2
2020
- name: Run the sh-checker
@@ -26,11 +26,11 @@ jobs:
2626
sh_checker_comment: true
2727
sh_checker_exclude: "LICENSE README.md README.zh-Hans-CN.md"
2828
filed-test:
29-
runs-on: ubuntu-latest
29+
runs-on: ubuntu-16.04
3030
steps:
3131
- name: Checkout
3232
uses: actions/checkout@v2
33-
- name: Filed-test on Ubuntu
33+
- name: Filed-test on Ubuntu 16.04
3434
run: |
3535
sudo bash install-release.sh
3636
sudo bash install-release.sh --check

install-release.sh

+3-8
Original file line numberDiff line numberDiff line change
@@ -116,27 +116,22 @@ identify_the_operating_system_and_architecture() {
116116
PACKAGE_MANAGEMENT_INSTALL='apt -y --no-install-recommends install'
117117
PACKAGE_MANAGEMENT_REMOVE='apt purge'
118118
package_provide_tput='ncurses-bin'
119-
package_provide_bsdtar='libarchive-tools'
120119
elif [[ "$(type -P dnf)" ]]; then
121120
PACKAGE_MANAGEMENT_INSTALL='dnf -y install'
122121
PACKAGE_MANAGEMENT_REMOVE='dnf remove'
123122
package_provide_tput='ncurses'
124-
package_provide_bsdtar='bsdtar'
125123
elif [[ "$(type -P yum)" ]]; then
126124
PACKAGE_MANAGEMENT_INSTALL='yum -y install'
127125
PACKAGE_MANAGEMENT_REMOVE='yum remove'
128126
package_provide_tput='ncurses'
129-
package_provide_bsdtar='bsdtar'
130127
elif [[ "$(type -P zypper)" ]]; then
131128
PACKAGE_MANAGEMENT_INSTALL='zypper install -y --no-recommends'
132129
PACKAGE_MANAGEMENT_REMOVE='zypper remove'
133130
package_provide_tput='ncurses-utils'
134-
package_provide_bsdtar='bsdtar'
135131
elif [[ "$(type -P pacman)" ]]; then
136132
PACKAGE_MANAGEMENT_INSTALL='pacman -Syu --noconfirm'
137133
PACKAGE_MANAGEMENT_REMOVE='pacman -Rsn'
138134
package_provide_tput='ncurses'
139-
package_provide_bsdtar='libarchive'
140135
else
141136
echo "error: The script does not support the package manager in this operating system."
142137
exit 1
@@ -307,7 +302,7 @@ download_v2ray() {
307302
}
308303

309304
decompression() {
310-
if ! bsdtar -C "$TMP_DIRECTORY" -xf "$1"; then
305+
if ! unzip -q "$1" -d "$TMP_DIRECTORY"; then
311306
echo 'error: V2Ray decompression failed.'
312307
"rm" -r "$TMP_DIRECTORY"
313308
echo "removed: $TMP_DIRECTORY"
@@ -531,7 +526,7 @@ main() {
531526
echo 'warn: Install V2Ray from a local file, but still need to make sure the network is available.'
532527
echo -n 'warn: Please make sure the file is valid because we cannot confirm it. (Press any key) ...'
533528
read -r
534-
install_software "$package_provide_bsdtar" 'bsdtar'
529+
install_software 'unzip' 'unzip'
535530
decompression "$LOCAL_FILE"
536531
else
537532
# Normal way
@@ -546,7 +541,7 @@ main() {
546541
echo "removed: $TMP_DIRECTORY"
547542
exit 0
548543
fi
549-
install_software "$package_provide_bsdtar" 'bsdtar'
544+
install_software 'unzip' 'unzip'
550545
decompression "$ZIP_FILE"
551546
elif [[ "$NUMBER" -eq '1' ]]; then
552547
echo "info: No new version. The current version of V2Ray is $CURRENT_VERSION ."

0 commit comments

Comments
 (0)