tlc: fix INSTALL.sh duplicate mkdir + cp into non-existent locales dir
End-to-end smoke test of dist/tlc-1.0.0/INSTALL.sh --user into a
temp HOME uncovered two bugs:
1. Duplicate 'mkdir -p' block before/after the script_dir
resolution. Removed the redundant second block.
2. 'cp -r config/* locales/* mc-skins/*' failed when run with
--user into ~/.local because the locale/skin subdirs were
not created first (only the parent datadir was). Now creates
all four target subdirs in the same mkdir block.
Smoke test result after fix: install into a fresh $HOME succeeds;
'~/.local/bin/{tlc,tlcedit,tlcview}' are on PATH; each binary
responds to --version / help. Same applies to system-wide install
prefix=/usr/local.
.deb package tested separately: 'dpkg-deb -x' into a temp prefix
also works; binaries verified responsive.
This commit is contained in:
+3
-2
@@ -20,11 +20,12 @@ if [[ "${1:-}" == "--user" ]]; then
|
||||
user_install=1
|
||||
fi
|
||||
|
||||
mkdir -p "${bindir}" "${mandir}" "${datadir}" "${configdir}"
|
||||
mkdir -p "${datadir}/locales" "${datadir}/mc-skins"
|
||||
|
||||
# Resolve the directory this script lives in.
|
||||
script_dir="$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)"
|
||||
|
||||
mkdir -p "${bindir}" "${mandir}" "${datadir}" "${configdir}"
|
||||
|
||||
install -m 0755 "${script_dir}/bin/tlc" "${bindir}/tlc"
|
||||
install -m 0755 "${script_dir}/bin/tlcedit" "${bindir}/tlcedit"
|
||||
install -m 0755 "${script_dir}/bin/tlcview" "${bindir}/tlcview"
|
||||
|
||||
Reference in New Issue
Block a user