summaryrefslogtreecommitdiffhomepage
path: root/subr
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-05 22:48:30 +0000
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2017-02-05 22:49:28 +0000
commit1fb5528bb06323a891d14b5b9475001524ff469c (patch)
tree2d65f90d6fff5c7a3512c124d9b3cf293ae4e675 /subr
parent51fbc32b57527b389ba533db097d0522ec04744c (diff)
downloadmidipix_build-1fb5528bb06323a891d14b5b9475001524ff469c.tar.bz2
midipix_build-1fb5528bb06323a891d14b5b9475001524ff469c.tar.xz
build.sh, {subr,vars}/*: general cleanup.
Diffstat (limited to 'subr')
-rw-r--r--subr/build.subr22
1 files changed, 11 insertions, 11 deletions
diff --git a/subr/build.subr b/subr/build.subr
index afd76072..e95bf44d 100644
--- a/subr/build.subr
+++ b/subr/build.subr
@@ -14,13 +14,13 @@ build_fileop() {
local _op="${1}"; shift;
if [ "${_op}" = cd ]; then
log_msg varn "Changing working directory to \`${1}'.";
- [ \( -n "${1}" \) -a \( -e "${1}" \) ] && cd -- ${1};
+ [ \( -n "${1}" \) -a \( -e "${1}" \) ] && cd -- "${1}";
elif [ "${_op}" = cp ]; then
log_msg varn "Copying \`${1}' to \`${2}' w/ -pPR.";
[ ${#} -ge 2 ] && cp -pPR -- "${@}";
elif [ "${_op}" = ln_symbolic ]; then
log_msg varn "Linking \`${1}' to \`${2}' w/ -fs";
- [ \( -n "${1}" \) -a \( -n "${2}" \) ] && ln -fs -- ${1} ${2};
+ [ \( -n "${1}" \) -a \( -n "${2}" \) ] && ln -fs -- "${1}" "${2}";
elif [ "${_op}" = mkdir ]\
|| [ "${_op}" = rm ]; then
while [ ${#} -gt 0 ]; do
@@ -53,22 +53,22 @@ install_files() {
_ln_target="${1%=*}";
_ln_target="${_ln_target#@}";
_ln_fname="${1#*=}";
- if [ -e ${_ln_fname} ]; then
+ if [ -e "${_ln_fname}" ]; then
if [ ${_verbose:-0} -eq 1 ]; then
- echo build_fileop rm ${_ln_fname};
+ echo build_fileop rm "${_ln_fname}";
fi;
- build_fileop rm ${_ln_fname};
+ build_fileop rm "${_ln_fname}";
fi;
- build_fileop ln_symbolic ${_ln_target} ${_prefix:+${_prefix}/}${_ln_fname};
+ build_fileop ln_symbolic "${_ln_target}" "${_prefix:+${_prefix}/}${_ln_fname}";
;;
/=*)
_mkdir_fname="${1#/=}";
- build_fileop mkdir ${_prefix:+${_prefix}/}${_mkdir_fname};
+ build_fileop mkdir "${_prefix:+${_prefix}/}${_mkdir_fname}";
;;
*)
_file_fname_src="${1%=*}";
_file_fname_dst="${1#*=}";
- build_fileop cp ${_file_fname_src} ${_prefix:+${_prefix}/}${_file_fname_dst};
+ build_fileop cp "${_file_fname_src}" "${_prefix:+${_prefix}/}${_file_fname_dst}";
;;
esac; shift;
done;
@@ -179,9 +179,9 @@ subst_tgts() {
while [ ${#} -ge 1 ]; do
case "${1}" in
devroot)
- echo ${DEVROOT_PACKAGES}; ;;
- world) echo ${WORLD_PACKAGES}; ;;
- *) echo ${1}; ;;
+ echo "${DEVROOT_PACKAGES}"; ;;
+ world) echo "${WORLD_PACKAGES}"; ;;
+ *) echo "${1}"; ;;
esac; shift;
done;
};