diff --git a/sh/self.sh b/sh/self.sh index 1906699..00f15e7 100644 --- a/sh/self.sh +++ b/sh/self.sh @@ -63,9 +63,14 @@ rwx_self_init() { _rwx_cmd_rwx_install() { rwx_self_install "${@}"; } rwx_self_install() { local target="${1}" - local command file + [ -n "${target}" ] || exit + local command file root + # code + root="${target}${RWX_ROOT_SYSTEM}" + rwx_remove "${root}" + cp --recursive "${RWX_ROOT_SYSTEM}" "${root}" # commands - local root="${target}/usr/local/bin" + root="${target}/usr/local/bin" for command in $(rwx_self_commands); do file="${root}/${command}" rwx_remove "${file}"