Files
3x-ui/install.sh
Intervence 34d2591e50 fix (install.sh): use realpath instead of script name (#6075)
* fix (install.sh): use realpath instead of script name

###Description:
During arch() sctipt tries to delete itself in case no compatible arch found. This may lead to unexpected file deletion if executed outside root dir; also cur_dir is declared but doesn't seem to be used anywhere

###Way to reproduce:
```bash
cd "/some/other_dir_with_install_sh"
/3x-ui/project/dir/install.sh
```

* fix(install): quote the script path before the self-delete

realpath was handed an unquoted $0, so a script living under a path that
contains spaces was split into several arguments: realpath printed a
partial path plus an error, and rm -f then targeted a name matching
nothing at all. The unsupported-arch branch silently kept the script it
means to remove — the very case the surrounding fix exists for.
2026-07-28 23:11:27 +02:00

76 KiB