Make sure the directory exists (sometimes it doesn't, e.g., EdgeRouter) (#307)

master
mask 2024-11-05 19:40:15 +08:00 committed by GitHub
parent b3cbf91a19
commit cb39ee8824
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -329,6 +329,8 @@ decompression() {
install_file() {
NAME="$1"
if [[ "$NAME" == 'v2ray' ]] || [[ "$NAME" == 'v2ctl' ]]; then
# Make sure the directory exists (sometimes it doesn't, e.g., EdgeRouter)
mkdir -p '/usr/local/bin'
install -m 755 "${TMP_DIRECTORY}/$NAME" "/usr/local/bin/$NAME"
elif [[ "$NAME" == 'geoip.dat' ]] || [[ "$NAME" == 'geosite.dat' ]]; then
install -m 644 "${TMP_DIRECTORY}/$NAME" "${DAT_PATH}/$NAME"