mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-07-31 04:12:13 +03:00
* 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.
76 KiB
76 KiB