From 2c3167178e0535c95b99bf9ec270bb8045d9d5fa Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 8 Dec 2024 22:37:36 +0100 Subject: [PATCH] self/install/code --- sh/self.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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}"