self/install/code
This commit is contained in:
parent
6d33252ea4
commit
2c3167178e
1 changed files with 7 additions and 2 deletions
|
@ -63,9 +63,14 @@ rwx_self_init() {
|
||||||
_rwx_cmd_rwx_install() { rwx_self_install "${@}"; }
|
_rwx_cmd_rwx_install() { rwx_self_install "${@}"; }
|
||||||
rwx_self_install() {
|
rwx_self_install() {
|
||||||
local target="${1}"
|
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
|
# commands
|
||||||
local root="${target}/usr/local/bin"
|
root="${target}/usr/local/bin"
|
||||||
for command in $(rwx_self_commands); do
|
for command in $(rwx_self_commands); do
|
||||||
file="${root}/${command}"
|
file="${root}/${command}"
|
||||||
rwx_remove "${file}"
|
rwx_remove "${file}"
|
||||||
|
|
Loading…
Reference in a new issue