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

pull/307/head
Analyser 2024-10-17 11:57:58 +08:00
parent b3cbf91a19
commit 3beaa8314d
No known key found for this signature in database
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"