summaryrefslogtreecommitdiffhomepage
path: root/subr/rtl_install.subr
diff options
context:
space:
mode:
Diffstat (limited to 'subr/rtl_install.subr')
-rw-r--r--subr/rtl_install.subr53
1 files changed, 0 insertions, 53 deletions
diff --git a/subr/rtl_install.subr b/subr/rtl_install.subr
deleted file mode 100644
index be940cd9..00000000
--- a/subr/rtl_install.subr
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# set +o errexit -o noglob -o nounset is assumed.
-#
-
-rtl_install() {
- local _verbose="" _prefix="" _ln_target="" _ln_fname="" \
- _mkdir_fname="" _file_fname_src="" _file_fname_dst="";
- if [ "${1}" = "-v" ]; then
- _verbose=1; shift;
- fi; _prefix="${1}"; shift;
- while [ ${#} -gt 0 ]; do
- case "${1}" in
- @*=*)
- _ln_target="${1%=*}";
- _ln_target="${_ln_target#@}";
- _ln_fname="${1#*=}";
- if [ "${_ln_fname#/}" = "${_ln_fname}" ]; then
- _ln_fname="${_prefix:+${_prefix}/}${_ln_fname}";
- fi;
- if [ -e "${_ln_fname}" ]; then
- rtl_fileop rm "${_ln_fname}";
- fi;
- if ! rtl_fileop ln_symbolic "${_ln_target}" "${_ln_fname}"; then
- return 1;
- fi;
- ;;
- /=*)
- _mkdir_fname="${1#/=}";
- if [ "${_mkdir_fname#/}" = "${_mkdir_fname}" ]; then
- _mkdir_fname="${_prefix:+${_prefix}/}${_mkdir_fname}";
- fi;
- if ! rtl_fileop mkdir "${_mkdir_fname}"; then
- return 1;
- fi;
- ;;
- *)
- _file_fname_src="${1%=*}";
- _file_fname_dst="${1#*=}";
- if [ "${_file_fname_src#/}" = "${_file_fname_src}" ]; then
- _file_fname_src="${_prefix:+${_prefix}/}${_file_fname_src}";
- fi;
- if [ "${_file_fname_dst#/}" = "${_file_fname_dst}" ]; then
- _file_fname_dst="${_prefix:+${_prefix}/}${_file_fname_dst}";
- fi;
- if ! rtl_fileop cp "${_file_fname_src}" "${_file_fname_dst}"; then
- return 1;
- fi;
- ;;
- esac; shift;
- done;
-};
-
-# vim:filetype=sh