@@ -116,27 +116,22 @@ identify_the_operating_system_and_architecture() {
116
116
PACKAGE_MANAGEMENT_INSTALL=' apt -y --no-install-recommends install'
117
117
PACKAGE_MANAGEMENT_REMOVE=' apt purge'
118
118
package_provide_tput=' ncurses-bin'
119
- package_provide_bsdtar=' libarchive-tools'
120
119
elif [[ " $( type -P dnf) " ]]; then
121
120
PACKAGE_MANAGEMENT_INSTALL=' dnf -y install'
122
121
PACKAGE_MANAGEMENT_REMOVE=' dnf remove'
123
122
package_provide_tput=' ncurses'
124
- package_provide_bsdtar=' bsdtar'
125
123
elif [[ " $( type -P yum) " ]]; then
126
124
PACKAGE_MANAGEMENT_INSTALL=' yum -y install'
127
125
PACKAGE_MANAGEMENT_REMOVE=' yum remove'
128
126
package_provide_tput=' ncurses'
129
- package_provide_bsdtar=' bsdtar'
130
127
elif [[ " $( type -P zypper) " ]]; then
131
128
PACKAGE_MANAGEMENT_INSTALL=' zypper install -y --no-recommends'
132
129
PACKAGE_MANAGEMENT_REMOVE=' zypper remove'
133
130
package_provide_tput=' ncurses-utils'
134
- package_provide_bsdtar=' bsdtar'
135
131
elif [[ " $( type -P pacman) " ]]; then
136
132
PACKAGE_MANAGEMENT_INSTALL=' pacman -Syu --noconfirm'
137
133
PACKAGE_MANAGEMENT_REMOVE=' pacman -Rsn'
138
134
package_provide_tput=' ncurses'
139
- package_provide_bsdtar=' libarchive'
140
135
else
141
136
echo " error: The script does not support the package manager in this operating system."
142
137
exit 1
@@ -307,7 +302,7 @@ download_v2ray() {
307
302
}
308
303
309
304
decompression () {
310
- if ! bsdtar -C " $TMP_DIRECTORY " -xf " $1 " ; then
305
+ if ! unzip -q " $1 " -d " $TMP_DIRECTORY " ; then
311
306
echo ' error: V2Ray decompression failed.'
312
307
" rm" -r " $TMP_DIRECTORY "
313
308
echo " removed: $TMP_DIRECTORY "
@@ -531,7 +526,7 @@ main() {
531
526
echo ' warn: Install V2Ray from a local file, but still need to make sure the network is available.'
532
527
echo -n ' warn: Please make sure the file is valid because we cannot confirm it. (Press any key) ...'
533
528
read -r
534
- install_software " $package_provide_bsdtar " ' bsdtar '
529
+ install_software ' unzip ' ' unzip '
535
530
decompression " $LOCAL_FILE "
536
531
else
537
532
# Normal way
@@ -546,7 +541,7 @@ main() {
546
541
echo " removed: $TMP_DIRECTORY "
547
542
exit 0
548
543
fi
549
- install_software " $package_provide_bsdtar " ' bsdtar '
544
+ install_software ' unzip ' ' unzip '
550
545
decompression " $ZIP_FILE "
551
546
elif [[ " $NUMBER " -eq ' 1' ]]; then
552
547
echo " info: No new version. The current version of V2Ray is $CURRENT_VERSION ."
0 commit comments